From e05d0c18a61fbc140c1f309411237f91f09b3df9 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Wed, 29 Jan 2003 03:25:03 +0000 Subject: [PATCH] Preload file if given on command line git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@18999 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- wxPython/wxPython/lib/PyCrust/PyShellApp.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/wxPython/wxPython/lib/PyCrust/PyShellApp.py b/wxPython/wxPython/lib/PyCrust/PyShellApp.py index a72869083f..5a2e522b82 100755 --- a/wxPython/wxPython/lib/PyCrust/PyShellApp.py +++ b/wxPython/wxPython/lib/PyCrust/PyShellApp.py @@ -27,6 +27,11 @@ class App(wx.wxApp): # >>> sys.application.whatever import sys sys.application = self + + # exec a startup script if one is given on the command line + if len(sys.argv) > 1: + self.shellFrame.shell.execStartupScript(sys.argv[1]) + return True