eric5_editor.py

changeset 2087
795992a5c561
parent 1509
c0b5e693b0eb
child 2302
f29e9405c851
equal deleted inserted replaced
2085:b4c1f0b6dac2 2087:795992a5c561
15 import sys 15 import sys
16 import os 16 import os
17 17
18 for arg in sys.argv: 18 for arg in sys.argv:
19 if arg.startswith("--config="): 19 if arg.startswith("--config="):
20 import Utilities 20 import Globals
21 configDir = arg.replace("--config=", "") 21 configDir = arg.replace("--config=", "")
22 Utilities.setConfigDir(configDir) 22 Globals.setConfigDir(configDir)
23 sys.argv.remove(arg) 23 sys.argv.remove(arg)
24 break 24 break
25 25
26 # make ThirdParty package available as a packages repository 26 # make ThirdParty package available as a packages repository
27 try: 27 try:
28 import pygments # __IGNORE_EXCEPTION__ __IGNORE_WARNING__ 28 import pygments # __IGNORE_EXCEPTION__ __IGNORE_WARNING__
29 except ImportError: 29 except ImportError:
30 sys.path.insert(2, os.path.join(os.path.dirname(__file__), "ThirdParty", "Pygments")) 30 sys.path.insert(2, os.path.join(os.path.dirname(__file__), "ThirdParty", "Pygments"))
31 31
32 from Utilities import Startup 32 from Globals import AppInfo
33
34 from Toolbox import Startup
33 35
34 36
35 def createMainWidget(argv): 37 def createMainWidget(argv):
36 """ 38 """
37 Function to create the main widget. 39 Function to create the main widget.
53 options = [\ 55 options = [\
54 ("--config=configDir", 56 ("--config=configDir",
55 "use the given directory as the one containing the config files"), 57 "use the given directory as the one containing the config files"),
56 ("", "name of file to edit") 58 ("", "name of file to edit")
57 ] 59 ]
58 appinfo = Startup.makeAppInfo(sys.argv, 60 appinfo = AppInfo.makeAppInfo(sys.argv,
59 "Eric5 Editor", 61 "Eric5 Editor",
60 "", 62 "",
61 "Simplified version of the eric5 editor", 63 "Simplified version of the eric5 editor",
62 options) 64 options)
63 res = Startup.simpleAppStartup(sys.argv, 65 res = Startup.simpleAppStartup(sys.argv,

eric ide

mercurial