Toolbox/Startup.py

branch
maintenance
changeset 6826
c6dda2cbe081
parent 6775
a84449ccb414
child 6891
93f82da09f22
--- a/Toolbox/Startup.py	Sat Feb 16 10:27:50 2019 +0100
+++ b/Toolbox/Startup.py	Sat Mar 02 11:15:24 2019 +0100
@@ -24,6 +24,8 @@
 
 from eric6config import getConfig
 
+application = None
+
 
 def usage(appinfo, optlen=12):
     """
@@ -220,11 +222,17 @@
         handler dialog (boolean)
     @return exit result (integer)
     """
+    global application
+    
+    if "__PYVENV_LAUNCHER__" in os.environ:
+        del os.environ["__PYVENV_LAUNCHER__"]
+    
     handleArgs(argv, appinfo)
     if app is None:
         # set the library paths for plugins
         setLibraryPaths()
         app = E5Application(argv)
+        application = app
     app.setQuitOnLastWindowClosed(quitOnLastWindowClosed)
     
     # the following code depends upon a valid application object

eric ide

mercurial