RefactoringRope/RefactoringClient.py

branch
eric7
changeset 381
88ef06966203
parent 375
c61a2f18ed78
child 385
9bbd74b51d88
equal deleted inserted replaced
380:02b38ad777be 381:88ef06966203
10 import sys 10 import sys
11 import os 11 import os
12 import contextlib 12 import contextlib
13 13
14 modulePath = sys.argv[-1] # it is always the last parameter 14 modulePath = sys.argv[-1] # it is always the last parameter
15 sys.path.insert(1, modulePath) 15 sys.path.append(modulePath)
16 16
17 try: 17 try:
18 import rope.base.project 18 import rope.base.project
19 import rope.base.libutils 19 import rope.base.libutils
20 except ImportError: 20 except ImportError:
1509 1509
1510 # Create a Qt6 application object in order to allow the processing of 1510 # Create a Qt6 application object in order to allow the processing of
1511 # modules containing Qt stuff. 1511 # modules containing Qt stuff.
1512 try: 1512 try:
1513 from PyQt6.QtCore import QCoreApplication 1513 from PyQt6.QtCore import QCoreApplication
1514 except ImportError: 1514 except (ImportError, RuntimeError):
1515 QCoreApplication = None 1515 QCoreApplication = None
1516 if QCoreApplication is not None: 1516 if QCoreApplication is not None:
1517 app = QCoreApplication(sys.argv) 1517 app = QCoreApplication([])
1518 1518
1519 client = RefactoringClient(host, int(port), projectPath) 1519 client = RefactoringClient(host, int(port), projectPath)
1520 # Start the main loop 1520 # Start the main loop
1521 client.run() 1521 client.run()
1522 1522

eric ide

mercurial