eric6/Utilities/BackgroundClient.py

branch
maintenance
changeset 8400
b3eefd7e58d1
parent 8273
698ae46f40a4
parent 8307
01a323d3d4d7
--- a/eric6/Utilities/BackgroundClient.py	Sat May 01 14:27:38 2021 +0200
+++ b/eric6/Utilities/BackgroundClient.py	Thu Jun 03 11:39:23 2021 +0200
@@ -217,12 +217,17 @@
             self.connection.close()
 
 if __name__ == '__main__':
-    if len(sys.argv) != 4:
-        print('Host, port and max. processes parameters are missing.'
-              ' Aborting.')
+    if len(sys.argv) != 5:
+        print('Host, port, max. processes and Python library path parameters'
+              ' are missing. Aborting...')
         sys.exit(1)
     
-    host, port, maxProcs = sys.argv[1:]
+    host, port, maxProcs, pyLibraryPath = sys.argv[1:]
+    
+    # insert pyLibraryPath into the search path because external stuff might
+    # be installed in the eric (virtual) environment
+    sys.path.insert(1, pyLibraryPath)
+    
     backgroundClient = BackgroundClient(host, int(port), int(maxProcs))
     # Start the main loop
     backgroundClient.run()

eric ide

mercurial