Toolbox/Startup.py

branch
maintenance
changeset 6826
c6dda2cbe081
parent 6775
a84449ccb414
child 6891
93f82da09f22
equal deleted inserted replaced
6764:d14ddbfbbd36 6826:c6dda2cbe081
21 from Globals import qVersionTuple 21 from Globals import qVersionTuple
22 22
23 import UI.PixmapCache 23 import UI.PixmapCache
24 24
25 from eric6config import getConfig 25 from eric6config import getConfig
26
27 application = None
26 28
27 29
28 def usage(appinfo, optlen=12): 30 def usage(appinfo, optlen=12):
29 """ 31 """
30 Module function to show the usage information. 32 Module function to show the usage information.
218 window (boolean) 220 window (boolean)
219 @keyparam installErrorHandler flag indicating to install an error 221 @keyparam installErrorHandler flag indicating to install an error
220 handler dialog (boolean) 222 handler dialog (boolean)
221 @return exit result (integer) 223 @return exit result (integer)
222 """ 224 """
225 global application
226
227 if "__PYVENV_LAUNCHER__" in os.environ:
228 del os.environ["__PYVENV_LAUNCHER__"]
229
223 handleArgs(argv, appinfo) 230 handleArgs(argv, appinfo)
224 if app is None: 231 if app is None:
225 # set the library paths for plugins 232 # set the library paths for plugins
226 setLibraryPaths() 233 setLibraryPaths()
227 app = E5Application(argv) 234 app = E5Application(argv)
235 application = app
228 app.setQuitOnLastWindowClosed(quitOnLastWindowClosed) 236 app.setQuitOnLastWindowClosed(quitOnLastWindowClosed)
229 237
230 # the following code depends upon a valid application object 238 # the following code depends upon a valid application object
231 import Preferences 239 import Preferences
232 240

eric ide

mercurial