RefactoringRope/CodeAssistClient.py

branch
eric7
changeset 381
88ef06966203
parent 374
958f34e97952
child 389
4f53795beff0
equal deleted inserted replaced
380:02b38ad777be 381:88ef06966203
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 13 modulePath = sys.argv[-1] # it is always the last parameter
14 sys.path.insert(1, modulePath) 14 sys.path.append(modulePath)
15 15
16 try: 16 try:
17 import rope.base.project 17 import rope.base.project
18 import rope.base.libutils 18 import rope.base.libutils
19 import rope.contrib.codeassist 19 import rope.contrib.codeassist
506 506
507 # Create a Qt6 application object in order to allow the processing of 507 # Create a Qt6 application object in order to allow the processing of
508 # modules containing Qt stuff. 508 # modules containing Qt stuff.
509 try: 509 try:
510 from PyQt6.QtCore import QCoreApplication 510 from PyQt6.QtCore import QCoreApplication
511 except ImportError: 511 except (ImportError, RuntimeError):
512 QCoreApplication = None 512 QCoreApplication = None
513 if QCoreApplication is not None: 513 if QCoreApplication is not None:
514 app = QCoreApplication(sys.argv) 514 app = QCoreApplication([])
515 515
516 client = CodeAssistClient(host, int(port), idString, projectPath) 516 client = CodeAssistClient(host, int(port), idString, projectPath)
517 # Start the main loop 517 # Start the main loop
518 client.run() 518 client.run()
519 519

eric ide

mercurial