12 """ |
12 """ |
13 |
13 |
14 import os |
14 import os |
15 import sys |
15 import sys |
16 |
16 |
17 sys.path.insert(1, os.path.join(os.path.dirname(__file__), "..", "..", "..", "..")) |
17 sys.path.insert( |
18 # four times up is the eric7 package directory |
18 1, |
|
19 os.path.join(os.path.dirname(__file__), "..", "..", "..", "..", ".."), |
|
20 ) |
|
21 # five times up is our installation directory |
19 |
22 |
20 for arg in sys.argv[:]: |
23 for arg in sys.argv[:]: |
21 if arg.startswith("--config="): |
24 if arg.startswith("--config="): |
22 from eric7 import Globals |
25 from eric7 import Globals |
23 |
26 |
49 @rtype QWidget or None |
52 @rtype QWidget or None |
50 """ |
53 """ |
51 if len(argv) > 1: |
54 if len(argv) > 1: |
52 fileName = os.path.basename(argv[1]) |
55 fileName = os.path.basename(argv[1]) |
53 if fileName.startswith("hg-histedit-"): |
56 if fileName.startswith("hg-histedit-"): |
54 from HgHisteditPlanEditor import HgHisteditPlanEditor |
57 from HgHisteditPlanEditor import ( # __IGNORE_WARNING_I10__ |
|
58 HgHisteditPlanEditor, |
|
59 ) |
55 |
60 |
56 return HgHisteditPlanEditor(argv[1]) |
61 return HgHisteditPlanEditor(argv[1]) |
57 elif fileName.startswith("hg-editor-"): |
62 elif fileName.startswith("hg-editor-"): |
58 from HgHisteditCommitEditor import HgHisteditCommitEditor |
63 from HgHisteditCommitEditor import ( # __IGNORE_WARNING_I10__ |
|
64 HgHisteditCommitEditor, |
|
65 ) |
59 |
66 |
60 return HgHisteditCommitEditor(argv[1]) |
67 return HgHisteditCommitEditor(argv[1]) |
61 |
68 |
62 return None |
69 return None |
63 |
70 |