14 import sys |
14 import sys |
15 import os |
15 import os |
16 |
16 |
17 originalPathString = os.getenv("PATH") |
17 originalPathString = os.getenv("PATH") |
18 |
18 |
19 sys.path.insert(1, os.path.dirname(__file__)) |
|
20 |
|
21 for arg in sys.argv[:]: |
19 for arg in sys.argv[:]: |
22 if arg.startswith("--config="): |
20 if arg.startswith("--config="): |
23 import Globals |
21 from eric7 import Globals |
24 |
22 |
25 configDir = arg.replace("--config=", "") |
23 configDir = arg.replace("--config=", "") |
26 Globals.setConfigDir(configDir) |
24 Globals.setConfigDir(configDir) |
27 sys.argv.remove(arg) |
25 sys.argv.remove(arg) |
28 elif arg.startswith("--settings="): |
26 elif arg.startswith("--settings="): |
34 QSettings.setPath( |
32 QSettings.setPath( |
35 QSettings.Format.IniFormat, QSettings.Scope.UserScope, settingsDir |
33 QSettings.Format.IniFormat, QSettings.Scope.UserScope, settingsDir |
36 ) |
34 ) |
37 sys.argv.remove(arg) |
35 sys.argv.remove(arg) |
38 |
36 |
39 from Globals import AppInfo |
37 from eric7.Globals import AppInfo |
40 |
38 |
41 from Toolbox import Startup |
39 from eric7.Toolbox import Startup |
42 |
40 |
43 |
41 |
44 def createMainWidget(argv): |
42 def createMainWidget(argv): |
45 """ |
43 """ |
46 Function to create the main widget. |
44 Function to create the main widget. |
47 |
45 |
48 @param argv list of commandline parameters (list of strings) |
46 @param argv list of commandline parameters (list of strings) |
49 @return reference to the main widget (QWidget) |
47 @return reference to the main widget (QWidget) |
50 """ |
48 """ |
51 from QScintilla.ShellWindow import ShellWindow |
49 from eric7.QScintilla.ShellWindow import ShellWindow |
52 |
50 |
53 return ShellWindow(originalPathString) |
51 return ShellWindow(originalPathString) |
54 |
52 |
55 |
53 |
56 def main(): |
54 def main(): |