src/eric7/eric7_testing.py

branch
eric7-maintenance
changeset 9442
906485dcd210
parent 9264
18a7312cfdb3
parent 9413
80c06d472826
child 9549
67295777d9fe
equal deleted inserted replaced
9379:f23c43e18046 9442:906485dcd210
13 """ 13 """
14 14
15 import sys 15 import sys
16 import os 16 import os
17 17
18 sys.path.insert(1, os.path.dirname(__file__))
19
20 for arg in sys.argv[:]: 18 for arg in sys.argv[:]:
21 if arg.startswith("--config="): 19 if arg.startswith("--config="):
22 import Globals 20 from eric7 import Globals
23 21
24 configDir = arg.replace("--config=", "") 22 configDir = arg.replace("--config=", "")
25 Globals.setConfigDir(configDir) 23 Globals.setConfigDir(configDir)
26 sys.argv.remove(arg) 24 sys.argv.remove(arg)
27 elif arg.startswith("--settings="): 25 elif arg.startswith("--settings="):
33 QSettings.setPath( 31 QSettings.setPath(
34 QSettings.Format.IniFormat, QSettings.Scope.UserScope, settingsDir 32 QSettings.Format.IniFormat, QSettings.Scope.UserScope, settingsDir
35 ) 33 )
36 sys.argv.remove(arg) 34 sys.argv.remove(arg)
37 35
38 from Globals import AppInfo 36 from eric7.Globals import AppInfo
39 37
40 from Toolbox import Startup 38 from eric7.Toolbox import Startup
41 39
42 40
43 def createMainWidget(argv): 41 def createMainWidget(argv):
44 """ 42 """
45 Function to create the main widget. 43 Function to create the main widget.
47 @param argv list of commandline parameters 45 @param argv list of commandline parameters
48 @type list of str 46 @type list of str
49 @return reference to the main widget 47 @return reference to the main widget
50 @rtype QWidget 48 @rtype QWidget
51 """ 49 """
52 from Testing.TestingWidget import TestingWindow 50 from eric7.Testing.TestingWidget import TestingWindow
53 51
54 try: 52 try:
55 fn = argv[1] 53 fn = argv[1]
56 except IndexError: 54 except IndexError:
57 fn = None 55 fn = None

eric ide

mercurial