--- 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()