8 """ |
8 """ |
9 |
9 |
10 import sys |
10 import sys |
11 import contextlib |
11 import contextlib |
12 |
12 |
|
13 modulePath = sys.argv[-1] # it is always the last parameter |
|
14 sys.path.insert(1, modulePath) |
|
15 |
13 try: |
16 try: |
14 from E5Network.E5JsonClient import E5JsonClient |
17 import rope.base.project |
|
18 import rope.base.libutils |
|
19 import rope.contrib.codeassist |
|
20 from rope.base.exceptions import BadIdentifierError, ModuleSyntaxError |
|
21 except ImportError: |
|
22 sys.exit(42) |
|
23 |
|
24 try: |
|
25 from eric6.E5Network.E5JsonClient import E5JsonClient |
15 except ImportError: |
26 except ImportError: |
16 # TODO: delete JsonClient once ported to eric7 |
27 # TODO: delete JsonClient once ported to eric7 |
17 from JsonClient import JsonClient as E5JsonClient |
28 from JsonClient import JsonClient as E5JsonClient |
18 |
29 |
19 |
30 |
438 if len(sys.argv) != 6: |
449 if len(sys.argv) != 6: |
439 print('Host, port, id, project path and module path parameters are' |
450 print('Host, port, id, project path and module path parameters are' |
440 ' missing. Abort.') |
451 ' missing. Abort.') |
441 sys.exit(1) |
452 sys.exit(1) |
442 |
453 |
443 host, port, idString, projectPath, modulePath = sys.argv[1:] |
454 host, port, idString, projectPath = sys.argv[1:-1] |
444 |
|
445 sys.path.insert(1, modulePath) |
|
446 try: |
|
447 import rope.base.project |
|
448 import rope.base.libutils |
|
449 import rope.contrib.codeassist |
|
450 from rope.base.exceptions import BadIdentifierError, ModuleSyntaxError |
|
451 except ImportError: |
|
452 sys.exit(42) |
|
453 |
455 |
454 # Create a Qt5 application object in order to allow the processing of |
456 # Create a Qt5 application object in order to allow the processing of |
455 # modules containing Qt stuff. |
457 # modules containing Qt stuff. |
456 try: |
458 try: |
457 from PyQt5.QtCore import QCoreApplication |
459 from PyQt5.QtCore import QCoreApplication |