eric5_compare.py

changeset 945
8cd4d08fa9f6
parent 896
f855351d5e98
child 1509
c0b5e693b0eb
equal deleted inserted replaced
944:1b59c4ba121e 945:8cd4d08fa9f6
6 6
7 """ 7 """
8 Eric5 Compare 8 Eric5 Compare
9 9
10 This is the main Python script that performs the necessary initialization 10 This is the main Python script that performs the necessary initialization
11 of the Compare module and starts the Qt event loop. This is a standalone 11 of the Compare module and starts the Qt event loop. This is a standalone
12 version of the integrated Compare module. 12 version of the integrated Compare module.
13 """ 13 """
14 14
15 import sys 15 import sys
16 16
21 Utilities.setConfigDir(configDir) 21 Utilities.setConfigDir(configDir)
22 sys.argv.remove(arg) 22 sys.argv.remove(arg)
23 break 23 break
24 24
25 from Utilities import Startup 25 from Utilities import Startup
26
26 27
27 def createMainWidget(argv): 28 def createMainWidget(argv):
28 """ 29 """
29 Function to create the main widget. 30 Function to create the main widget.
30 31
38 elif len(argv) >= 2: 39 elif len(argv) >= 2:
39 return CompareWindow([("", argv[-2]), ("", argv[-1])]) 40 return CompareWindow([("", argv[-2]), ("", argv[-1])])
40 else: 41 else:
41 return CompareWindow() 42 return CompareWindow()
42 43
44
43 def main(): 45 def main():
44 """ 46 """
45 Main entry point into the application. 47 Main entry point into the application.
46 """ 48 """
47 options = [\ 49 options = [\
48 ("--config=configDir", 50 ("--config=configDir",
49 "use the given directory as the one containing the config files"), 51 "use the given directory as the one containing the config files"),
50 ] 52 ]
51 appinfo = Startup.makeAppInfo(sys.argv, 53 appinfo = Startup.makeAppInfo(sys.argv,
52 "Eric5 Compare", 54 "Eric5 Compare",
53 "", 55 "",
54 "Simple graphical compare tool", 56 "Simple graphical compare tool",

eric ide

mercurial