From 8eca4fef106b8327e2e55636de3f68a511a4c392 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Fri, 5 Mar 2004 00:06:33 +0000 Subject: [PATCH] When running samples from the demo standalone you can now add a --shell to the command line and it will start a PyShell to go with it. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@26089 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- wxPython/demo/AnalogClockWindow.py | 2 +- wxPython/demo/ArtProvider.py | 2 +- wxPython/demo/Button.py | 2 +- wxPython/demo/Calendar.py | 2 +- wxPython/demo/CalendarCtrl.py | 2 +- wxPython/demo/CheckBox.py | 2 +- wxPython/demo/CheckListBox.py | 2 +- wxPython/demo/Choice.py | 2 +- wxPython/demo/ColourDB.py | 2 +- wxPython/demo/ColourDialog.py | 2 +- wxPython/demo/ColourSelect.py | 2 +- wxPython/demo/ComboBox.py | 2 +- wxPython/demo/ContextHelp.py | 2 +- wxPython/demo/Cursor.py | 2 +- wxPython/demo/Dialog.py | 2 +- wxPython/demo/DirDialog.py | 2 +- wxPython/demo/DragAndDrop.py | 2 +- wxPython/demo/DragImage.py | 2 +- wxPython/demo/DrawXXXList.py | 2 +- wxPython/demo/DynamicSashWindow.py | 2 +- wxPython/demo/EditableListBox.py | 2 +- wxPython/demo/Editor.py | 2 +- wxPython/demo/EventManager.py | 2 +- wxPython/demo/FancyText.py | 2 +- wxPython/demo/FileBrowseButton.py | 2 +- wxPython/demo/FileDialog.py | 2 +- wxPython/demo/FileDialog_Save.py | 2 +- wxPython/demo/FileHistory.py | 2 +- wxPython/demo/FindReplaceDialog.py | 2 +- wxPython/demo/FloatBar.py | 2 +- wxPython/demo/FontDialog.py | 2 +- wxPython/demo/FontEnumerator.py | 2 +- wxPython/demo/Frame.py | 2 +- wxPython/demo/GLCanvas.py | 2 +- wxPython/demo/Gauge.py | 2 +- wxPython/demo/GenericButtons.py | 2 +- wxPython/demo/GenericDirCtrl.py | 2 +- wxPython/demo/Grid.py | 2 +- wxPython/demo/GridBagSizer.py | 2 +- wxPython/demo/Grid_MegaExample.py | 2 +- wxPython/demo/HtmlWindow.py | 2 +- wxPython/demo/IEHtmlWin.py | 2 +- wxPython/demo/Image.py | 2 +- wxPython/demo/ImageBrowser.py | 2 +- wxPython/demo/ImageFromStream.py | 2 +- wxPython/demo/IntCtrl.py | 2 +- wxPython/demo/Joystick.py | 2 +- wxPython/demo/KeyEvents.py | 2 +- wxPython/demo/LEDNumberCtrl.py | 2 +- wxPython/demo/LayoutAnchors.py | 2 +- wxPython/demo/LayoutConstraints.py | 2 +- wxPython/demo/Layoutf.py | 2 +- wxPython/demo/ListBox.py | 2 +- wxPython/demo/ListCtrl.py | 2 +- wxPython/demo/ListCtrl_virtual.py | 2 +- wxPython/demo/Listbook.py | 2 +- wxPython/demo/MDIWindows.py | 2 +- wxPython/demo/MVCTree.py | 2 +- wxPython/demo/Main.py | 3 +- wxPython/demo/Mask.py | 2 +- wxPython/demo/MaskedEditControls.py | 2 +- wxPython/demo/MaskedNumCtrl.py | 2 +- wxPython/demo/Menu.py | 2 +- wxPython/demo/MessageDialog.py | 2 +- wxPython/demo/MimeTypesManager.py | 2 +- wxPython/demo/MiniFrame.py | 2 +- wxPython/demo/MultiSash.py | 2 +- wxPython/demo/MultipleChoiceDialog.py | 2 +- wxPython/demo/NewNamespace.py | 2 +- wxPython/demo/Notebook.py | 2 +- wxPython/demo/OGL.py | 2 +- wxPython/demo/OOR.py | 2 +- wxPython/demo/PageSetupDialog.py | 2 +- wxPython/demo/PlotCanvas.py | 2 +- wxPython/demo/PopupControl.py | 2 +- wxPython/demo/PopupMenu.py | 2 +- wxPython/demo/PopupWindow.py | 2 +- wxPython/demo/PrintDialog.py | 2 +- wxPython/demo/PrintFramework.py | 2 +- wxPython/demo/Process.py | 2 +- wxPython/demo/ProgressDialog.py | 2 +- wxPython/demo/PyColourChooser.py | 2 +- wxPython/demo/PyCrust.py | 2 +- wxPython/demo/PyPlot.py | 2 +- wxPython/demo/PyShell.py | 2 +- wxPython/demo/PythonEvents.py | 2 +- wxPython/demo/RadioBox.py | 2 +- wxPython/demo/RadioButton.py | 2 +- wxPython/demo/RightTextCtrl.py | 2 +- wxPython/demo/RowColSizer.py | 2 +- wxPython/demo/SashWindow.py | 2 +- wxPython/demo/ScrolledMessageDialog.py | 2 +- wxPython/demo/ScrolledPanel.py | 2 +- wxPython/demo/ScrolledWindow.py | 2 +- wxPython/demo/ShapedWindow.py | 2 +- wxPython/demo/SingleChoiceDialog.py | 2 +- wxPython/demo/Slider.py | 2 +- wxPython/demo/Sound.py | 2 +- wxPython/demo/SpinButton.py | 2 +- wxPython/demo/SpinCtrl.py | 2 +- wxPython/demo/SplitTree.py | 2 +- wxPython/demo/SplitterWindow.py | 17 +++++++----- wxPython/demo/StaticBitmap.py | 2 +- wxPython/demo/StaticText.py | 2 +- wxPython/demo/StatusBar.py | 2 +- wxPython/demo/StyledTextCtrl_1.py | 2 +- wxPython/demo/StyledTextCtrl_2.py | 2 +- wxPython/demo/TablePrint.py | 2 +- wxPython/demo/TextCtrl.py | 2 +- wxPython/demo/TextEntryDialog.py | 2 +- wxPython/demo/Threads.py | 2 +- wxPython/demo/Throbber.py | 2 +- wxPython/demo/TimeCtrl.py | 2 +- wxPython/demo/Timer.py | 2 +- wxPython/demo/ToggleButton.py | 2 +- wxPython/demo/ToolBar.py | 2 +- wxPython/demo/TreeCtrl.py | 2 +- wxPython/demo/TreeListCtrl.py | 2 +- wxPython/demo/URLDragAndDrop.py | 2 +- wxPython/demo/Unicode.py | 2 +- wxPython/demo/VListBox.py | 5 ++-- wxPython/demo/Validator.py | 2 +- wxPython/demo/Wizard.py | 2 +- wxPython/demo/XMLtreeview.py | 2 +- wxPython/demo/XmlResource.py | 2 +- wxPython/demo/XmlResourceHandler.py | 2 +- wxPython/demo/XmlResourceSubclass.py | 2 +- wxPython/demo/data/widgetTest.htm | 2 +- wxPython/demo/run.py | 38 ++++++++++++++++++++++++-- wxPython/demo/template.py | 2 +- wxPython/demo/templateold.py | 2 +- wxPython/demo/widgetTest.py | 2 +- 132 files changed, 179 insertions(+), 140 deletions(-) diff --git a/wxPython/demo/AnalogClockWindow.py b/wxPython/demo/AnalogClockWindow.py index 2857714907..ccfc869f85 100644 --- a/wxPython/demo/AnalogClockWindow.py +++ b/wxPython/demo/AnalogClockWindow.py @@ -102,5 +102,5 @@ Check the options available by right-clicking the clock. if __name__ == '__main__': import sys,os import run - run.main(['', os.path.basename(sys.argv[0])]) + run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:]) diff --git a/wxPython/demo/ArtProvider.py b/wxPython/demo/ArtProvider.py index 26b88061b4..e0ce3ba9db 100644 --- a/wxPython/demo/ArtProvider.py +++ b/wxPython/demo/ArtProvider.py @@ -849,7 +849,7 @@ V\xab\x95\xb2\xd9,y<\x1e2\x18\x0c\x8ak\xb5Z-9\x9dN*\x14\n\xdf\x9e\x9c$@*\x95\ if __name__ == '__main__': import sys,os import run - run.main(['', os.path.basename(sys.argv[0])]) + run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:]) diff --git a/wxPython/demo/Button.py b/wxPython/demo/Button.py index 75e5893785..49d0a1aad4 100644 --- a/wxPython/demo/Button.py +++ b/wxPython/demo/Button.py @@ -79,5 +79,5 @@ placed on nearly any kind of window. if __name__ == '__main__': import sys,os import run - run.main(['', os.path.basename(sys.argv[0])]) + run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:]) diff --git a/wxPython/demo/Calendar.py b/wxPython/demo/Calendar.py index a0d4591278..d461aa23a3 100644 --- a/wxPython/demo/Calendar.py +++ b/wxPython/demo/Calendar.py @@ -665,5 +665,5 @@ by Lorne White if __name__ == '__main__': import sys,os import run - run.main(['', os.path.basename(sys.argv[0])]) + run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:]) diff --git a/wxPython/demo/CalendarCtrl.py b/wxPython/demo/CalendarCtrl.py index b91e8f8d3e..89a0ba0471 100644 --- a/wxPython/demo/CalendarCtrl.py +++ b/wxPython/demo/CalendarCtrl.py @@ -64,5 +64,5 @@ so I think both will stay in wxPython. if __name__ == '__main__': import sys,os import run - run.main(['', os.path.basename(sys.argv[0])]) + run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:]) diff --git a/wxPython/demo/CheckBox.py b/wxPython/demo/CheckBox.py index e436b35794..e4bc135066 100644 --- a/wxPython/demo/CheckBox.py +++ b/wxPython/demo/CheckBox.py @@ -42,5 +42,5 @@ A checkbox is a labelled box which is either on (checkmark is visible) or off if __name__ == '__main__': import sys,os import run - run.main(['', os.path.basename(sys.argv[0])]) + run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:]) diff --git a/wxPython/demo/CheckListBox.py b/wxPython/demo/CheckListBox.py index 904ac1bb25..72a0d66ab3 100644 --- a/wxPython/demo/CheckListBox.py +++ b/wxPython/demo/CheckListBox.py @@ -83,5 +83,5 @@ labels dynamically. if __name__ == '__main__': import sys,os import run - run.main(['', os.path.basename(sys.argv[0])]) + run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:]) diff --git a/wxPython/demo/Choice.py b/wxPython/demo/Choice.py index afa3ac1264..35b02b312a 100644 --- a/wxPython/demo/Choice.py +++ b/wxPython/demo/Choice.py @@ -50,5 +50,5 @@ The number of choices and the choice array are consilidated into one python if __name__ == '__main__': import sys,os import run - run.main(['', os.path.basename(sys.argv[0])]) + run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:]) diff --git a/wxPython/demo/ColourDB.py b/wxPython/demo/ColourDB.py index 1680c31a9d..b3b08ce878 100644 --- a/wxPython/demo/ColourDB.py +++ b/wxPython/demo/ColourDB.py @@ -196,5 +196,5 @@ Trying to do otherwise will cause an exception to be raised. if __name__ == '__main__': import sys,os import run - run.main(['', os.path.basename(sys.argv[0])]) + run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:]) diff --git a/wxPython/demo/ColourDialog.py b/wxPython/demo/ColourDialog.py index 136e58722f..79657a04c8 100644 --- a/wxPython/demo/ColourDialog.py +++ b/wxPython/demo/ColourDialog.py @@ -51,5 +51,5 @@ for details. if __name__ == '__main__': import sys,os import run - run.main(['', os.path.basename(sys.argv[0])]) + run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:]) diff --git a/wxPython/demo/ColourSelect.py b/wxPython/demo/ColourSelect.py index 48a0e118ca..01065dd37b 100644 --- a/wxPython/demo/ColourSelect.py +++ b/wxPython/demo/ColourSelect.py @@ -112,5 +112,5 @@ A coloured button that when clicked allows the user to select a colour from the if __name__ == '__main__': import sys,os import run - run.main(['', os.path.basename(sys.argv[0])]) + run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:]) diff --git a/wxPython/demo/ComboBox.py b/wxPython/demo/ComboBox.py index dc16c72b29..9cebf42113 100644 --- a/wxPython/demo/ComboBox.py +++ b/wxPython/demo/ComboBox.py @@ -103,5 +103,5 @@ event is generated every time that the user hits a key in the ComboBox entry fie if __name__ == '__main__': import sys,os import run - run.main(['', os.path.basename(sys.argv[0])]) + run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:]) diff --git a/wxPython/demo/ContextHelp.py b/wxPython/demo/ContextHelp.py index 3a6727c504..a3aea8b3e6 100644 --- a/wxPython/demo/ContextHelp.py +++ b/wxPython/demo/ContextHelp.py @@ -107,5 +107,5 @@ help into your application using the wx.SimpleHelpProvider class. if __name__ == '__main__': import sys,os import run - run.main(['', os.path.basename(sys.argv[0])]) + run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:]) diff --git a/wxPython/demo/Cursor.py b/wxPython/demo/Cursor.py index 8d05e7cb2c..0429bdd4b9 100644 --- a/wxPython/demo/Cursor.py +++ b/wxPython/demo/Cursor.py @@ -135,5 +135,5 @@ This demo shows the stock mouse cursors that are available to wxPython. if __name__ == '__main__': import sys,os import run - run.main(['', os.path.basename(sys.argv[0])]) + run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:]) diff --git a/wxPython/demo/Dialog.py b/wxPython/demo/Dialog.py index 3c4fb71721..5d5b8f0928 100644 --- a/wxPython/demo/Dialog.py +++ b/wxPython/demo/Dialog.py @@ -129,5 +129,5 @@ See the documentation for the Dialog class for more details. if __name__ == '__main__': import sys,os import run - run.main(['', os.path.basename(sys.argv[0])]) + run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:]) diff --git a/wxPython/demo/DirDialog.py b/wxPython/demo/DirDialog.py index 10a4dc2ebc..c8ad180c24 100644 --- a/wxPython/demo/DirDialog.py +++ b/wxPython/demo/DirDialog.py @@ -32,5 +32,5 @@ methods; see the DirDialog documentation for specifics. if __name__ == '__main__': import sys,os import run - run.main(['', os.path.basename(sys.argv[0])]) + run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:]) diff --git a/wxPython/demo/DragAndDrop.py b/wxPython/demo/DragAndDrop.py index 5039872fc2..3b393d6bc8 100644 --- a/wxPython/demo/DragAndDrop.py +++ b/wxPython/demo/DragAndDrop.py @@ -261,5 +261,5 @@ processor. Let us describe what each of them should do. if __name__ == '__main__': import sys,os import run - run.main(['', os.path.basename(sys.argv[0])]) + run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:]) diff --git a/wxPython/demo/DragImage.py b/wxPython/demo/DragImage.py index 05f7853a99..f686421b63 100644 --- a/wxPython/demo/DragImage.py +++ b/wxPython/demo/DragImage.py @@ -337,5 +337,5 @@ full-screen dragging. if __name__ == '__main__': import sys,os import run - run.main(['', os.path.basename(sys.argv[0])]) + run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:]) diff --git a/wxPython/demo/DrawXXXList.py b/wxPython/demo/DrawXXXList.py index a7537af348..5086b14c01 100644 --- a/wxPython/demo/DrawXXXList.py +++ b/wxPython/demo/DrawXXXList.py @@ -449,5 +449,5 @@ drawing routines. Currently they are: if __name__ == '__main__': import sys,os import run - run.main(['', os.path.basename(sys.argv[0])]) + run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:]) diff --git a/wxPython/demo/DynamicSashWindow.py b/wxPython/demo/DynamicSashWindow.py index a3f3106b8f..ed28ede75f 100644 --- a/wxPython/demo/DynamicSashWindow.py +++ b/wxPython/demo/DynamicSashWindow.py @@ -160,5 +160,5 @@ You will need to set the scrollbars' event handler at three times: if __name__ == '__main__': import sys,os import run - run.main(['', os.path.basename(sys.argv[0])]) + run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:]) diff --git a/wxPython/demo/EditableListBox.py b/wxPython/demo/EditableListBox.py index c89cb3ebfb..55de3b6980 100644 --- a/wxPython/demo/EditableListBox.py +++ b/wxPython/demo/EditableListBox.py @@ -93,5 +93,5 @@ a list of strings. if __name__ == '__main__': import sys,os import run - run.main(['', os.path.basename(sys.argv[0])]) + run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:]) diff --git a/wxPython/demo/Editor.py b/wxPython/demo/Editor.py index 1a3b508c19..114f2f00b4 100644 --- a/wxPython/demo/Editor.py +++ b/wxPython/demo/Editor.py @@ -65,5 +65,5 @@ SetAltFuncs() method. if __name__ == '__main__': import sys,os import run - run.main(['', os.path.basename(sys.argv[0])]) + run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:]) diff --git a/wxPython/demo/EventManager.py b/wxPython/demo/EventManager.py index 8d77084aa7..90c582f53c 100644 --- a/wxPython/demo/EventManager.py +++ b/wxPython/demo/EventManager.py @@ -283,5 +283,5 @@ by Robb Shecter (robb@acm.org) if __name__ == '__main__': import sys,os import run - run.main(['', os.path.basename(sys.argv[0])]) + run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:]) diff --git a/wxPython/demo/FancyText.py b/wxPython/demo/FancyText.py index 306d53db59..b7c954c276 100644 --- a/wxPython/demo/FancyText.py +++ b/wxPython/demo/FancyText.py @@ -78,5 +78,5 @@ The End if __name__ == '__main__': import sys,os import run - run.main(['', os.path.basename(sys.argv[0])]) + run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:]) diff --git a/wxPython/demo/FileBrowseButton.py b/wxPython/demo/FileBrowseButton.py index 2746101ea2..980bc689f6 100644 --- a/wxPython/demo/FileBrowseButton.py +++ b/wxPython/demo/FileBrowseButton.py @@ -82,5 +82,5 @@ overview = """ if __name__ == '__main__': import sys,os import run - run.main(['', os.path.basename(sys.argv[0])]) + run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:]) diff --git a/wxPython/demo/FileDialog.py b/wxPython/demo/FileDialog.py index 9129c4381b..903f14dbfb 100644 --- a/wxPython/demo/FileDialog.py +++ b/wxPython/demo/FileDialog.py @@ -62,5 +62,5 @@ filenames combined as a Python list. if __name__ == '__main__': import sys,os import run - run.main(['', os.path.basename(sys.argv[0])]) + run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:]) diff --git a/wxPython/demo/FileDialog_Save.py b/wxPython/demo/FileDialog_Save.py index f87108d4c6..1edda13224 100644 --- a/wxPython/demo/FileDialog_Save.py +++ b/wxPython/demo/FileDialog_Save.py @@ -83,5 +83,5 @@ Yum! if __name__ == '__main__': import sys,os import run - run.main(['', os.path.basename(sys.argv[0])]) + run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:]) diff --git a/wxPython/demo/FileHistory.py b/wxPython/demo/FileHistory.py index 98403b1493..ff650b71d3 100644 --- a/wxPython/demo/FileHistory.py +++ b/wxPython/demo/FileHistory.py @@ -139,5 +139,5 @@ associated menu. if __name__ == '__main__': import sys,os import run - run.main(['', os.path.basename(sys.argv[0])]) + run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:]) diff --git a/wxPython/demo/FindReplaceDialog.py b/wxPython/demo/FindReplaceDialog.py index 6812b05b66..5180882231 100644 --- a/wxPython/demo/FindReplaceDialog.py +++ b/wxPython/demo/FindReplaceDialog.py @@ -117,5 +117,5 @@ will be invalid after the parent dialog is destroyed. if __name__ == '__main__': import sys,os import run - run.main(['', os.path.basename(sys.argv[0])]) + run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:]) diff --git a/wxPython/demo/FloatBar.py b/wxPython/demo/FloatBar.py index 6b75e9dbee..8be8583649 100644 --- a/wxPython/demo/FloatBar.py +++ b/wxPython/demo/FloatBar.py @@ -107,7 +107,7 @@ close it to make the toolbar return to its original position. if __name__ == '__main__': import sys,os import run - run.main(['', os.path.basename(sys.argv[0])]) + run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:]) diff --git a/wxPython/demo/FontDialog.py b/wxPython/demo/FontDialog.py index 6457226b33..879957544f 100644 --- a/wxPython/demo/FontDialog.py +++ b/wxPython/demo/FontDialog.py @@ -134,5 +134,5 @@ to APPLY that information once you get it. if __name__ == '__main__': import sys,os import run - run.main(['', os.path.basename(sys.argv[0])]) + run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:]) diff --git a/wxPython/demo/FontEnumerator.py b/wxPython/demo/FontEnumerator.py index 0a66c7ab73..4356a5a821 100644 --- a/wxPython/demo/FontEnumerator.py +++ b/wxPython/demo/FontEnumerator.py @@ -76,5 +76,5 @@ the given encoding. if __name__ == '__main__': import sys,os import run - run.main(['', os.path.basename(sys.argv[0])]) + run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:]) diff --git a/wxPython/demo/Frame.py b/wxPython/demo/Frame.py index eef20b1c2a..f58a3c0e14 100644 --- a/wxPython/demo/Frame.py +++ b/wxPython/demo/Frame.py @@ -63,5 +63,5 @@ the Frame itself. if __name__ == '__main__': import sys,os import run - run.main(['', os.path.basename(sys.argv[0])]) + run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:]) diff --git a/wxPython/demo/GLCanvas.py b/wxPython/demo/GLCanvas.py index 119621729f..6757931c2f 100644 --- a/wxPython/demo/GLCanvas.py +++ b/wxPython/demo/GLCanvas.py @@ -266,7 +266,7 @@ overview = """\ if __name__ == '__main__': import sys,os import run - run.main(['', os.path.basename(sys.argv[0])]) + run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:]) diff --git a/wxPython/demo/Gauge.py b/wxPython/demo/Gauge.py index e6836f683e..02fc30730e 100644 --- a/wxPython/demo/Gauge.py +++ b/wxPython/demo/Gauge.py @@ -62,5 +62,5 @@ to present the same sort of control as a dialog to the user. if __name__ == '__main__': import sys,os import run - run.main(['', os.path.basename(sys.argv[0])]) + run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:]) diff --git a/wxPython/demo/GenericButtons.py b/wxPython/demo/GenericButtons.py index bbbb6d8c02..1e0ad0a146 100644 --- a/wxPython/demo/GenericButtons.py +++ b/wxPython/demo/GenericButtons.py @@ -151,5 +151,5 @@ overview = buttons.__doc__ if __name__ == '__main__': import sys,os import run - run.main(['', os.path.basename(sys.argv[0])]) + run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:]) diff --git a/wxPython/demo/GenericDirCtrl.py b/wxPython/demo/GenericDirCtrl.py index abfc54bb46..89f5283516 100644 --- a/wxPython/demo/GenericDirCtrl.py +++ b/wxPython/demo/GenericDirCtrl.py @@ -65,5 +65,5 @@ The filters work in the same manner as in FileDialog. if __name__ == '__main__': import sys,os import run - run.main(['', os.path.basename(sys.argv[0])]) + run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:]) diff --git a/wxPython/demo/Grid.py b/wxPython/demo/Grid.py index f1f9fb8309..d2c1af22e9 100644 --- a/wxPython/demo/Grid.py +++ b/wxPython/demo/Grid.py @@ -96,5 +96,5 @@ and wrapping around to the next row when needed. if __name__ == '__main__': import sys,os import run - run.main(['', os.path.basename(sys.argv[0])]) + run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:]) diff --git a/wxPython/demo/GridBagSizer.py b/wxPython/demo/GridBagSizer.py index a0ee009bce..867e32b7a7 100644 --- a/wxPython/demo/GridBagSizer.py +++ b/wxPython/demo/GridBagSizer.py @@ -144,5 +144,5 @@ span across more than one row or column. if __name__ == '__main__': import sys,os import run - run.main(['', os.path.basename(sys.argv[0])]) + run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:]) diff --git a/wxPython/demo/Grid_MegaExample.py b/wxPython/demo/Grid_MegaExample.py index f6d6a503fd..6c458ef0e2 100644 --- a/wxPython/demo/Grid_MegaExample.py +++ b/wxPython/demo/Grid_MegaExample.py @@ -479,5 +479,5 @@ behavior and various hacks. if __name__ == '__main__': import sys,os import run - run.main(['', os.path.basename(sys.argv[0])]) + run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:]) diff --git a/wxPython/demo/HtmlWindow.py b/wxPython/demo/HtmlWindow.py index d21fea1768..a3321cfbfc 100644 --- a/wxPython/demo/HtmlWindow.py +++ b/wxPython/demo/HtmlWindow.py @@ -216,7 +216,7 @@ wraps the core MSIE HTML viewer. if __name__ == '__main__': import sys,os import run - run.main(['', os.path.basename(sys.argv[0])]) + run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:]) diff --git a/wxPython/demo/IEHtmlWin.py b/wxPython/demo/IEHtmlWin.py index 4818e9d9b4..874580dd2b 100644 --- a/wxPython/demo/IEHtmlWin.py +++ b/wxPython/demo/IEHtmlWin.py @@ -214,7 +214,7 @@ events and etc. as would be expected from any other wx window. if __name__ == '__main__': import sys,os import run - run.main(['', os.path.basename(sys.argv[0])]) + run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:]) #---------------------------------------------------------------------- diff --git a/wxPython/demo/Image.py b/wxPython/demo/Image.py index 6193f004d7..a6f9a9c9e9 100644 --- a/wxPython/demo/Image.py +++ b/wxPython/demo/Image.py @@ -73,5 +73,5 @@ wxPNMHandler will always save as raw RGB. if __name__ == '__main__': import sys,os import run - run.main(['', os.path.basename(sys.argv[0])]) + run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:]) diff --git a/wxPython/demo/ImageBrowser.py b/wxPython/demo/ImageBrowser.py index 491457ca84..863416584e 100644 --- a/wxPython/demo/ImageBrowser.py +++ b/wxPython/demo/ImageBrowser.py @@ -44,5 +44,5 @@ overview = """\ if __name__ == '__main__': import sys,os import run - run.main(['', os.path.basename(sys.argv[0])]) + run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:]) diff --git a/wxPython/demo/ImageFromStream.py b/wxPython/demo/ImageFromStream.py index 5bc72afb55..15e1e39993 100644 --- a/wxPython/demo/ImageFromStream.py +++ b/wxPython/demo/ImageFromStream.py @@ -43,4 +43,4 @@ using StringIO. """ if __name__ == '__main__': import sys,os import run - run.main(['', os.path.basename(sys.argv[0])]) + run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:]) diff --git a/wxPython/demo/IntCtrl.py b/wxPython/demo/IntCtrl.py index 1b56843e75..16b5610eb5 100644 --- a/wxPython/demo/IntCtrl.py +++ b/wxPython/demo/IntCtrl.py @@ -339,4 +339,4 @@ it will either be adjusted or colored as appropriate. if __name__ == '__main__': import sys,os import run - run.main(['', os.path.basename(sys.argv[0])]) + run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:]) diff --git a/wxPython/demo/Joystick.py b/wxPython/demo/Joystick.py index 857ec2d83b..219dbd139f 100644 --- a/wxPython/demo/Joystick.py +++ b/wxPython/demo/Joystick.py @@ -1083,4 +1083,4 @@ needed, then re-start the timer, possibly using wx.CallAfter(). if __name__ == '__main__': import sys,os import run - run.main(['', os.path.basename(sys.argv[0])]) + run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:]) diff --git a/wxPython/demo/KeyEvents.py b/wxPython/demo/KeyEvents.py index 5439dfb76e..05b4a2c1a5 100644 --- a/wxPython/demo/KeyEvents.py +++ b/wxPython/demo/KeyEvents.py @@ -341,5 +341,5 @@ It is meant to be used as a compatibility test for cross platform work. if __name__ == '__main__': import sys,os import run - run.main(['', os.path.basename(sys.argv[0])]) + run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:]) diff --git a/wxPython/demo/LEDNumberCtrl.py b/wxPython/demo/LEDNumberCtrl.py index da45690412..0217d6910a 100644 --- a/wxPython/demo/LEDNumberCtrl.py +++ b/wxPython/demo/LEDNumberCtrl.py @@ -112,5 +112,5 @@ numeric input. if __name__ == '__main__': import sys,os import run - run.main(['', os.path.basename(sys.argv[0])]) + run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:]) diff --git a/wxPython/demo/LayoutAnchors.py b/wxPython/demo/LayoutAnchors.py index d4b674885d..188cdd2f5b 100644 --- a/wxPython/demo/LayoutAnchors.py +++ b/wxPython/demo/LayoutAnchors.py @@ -239,5 +239,5 @@ overview = """ if __name__ == '__main__': import sys,os import run - run.main(['', os.path.basename(sys.argv[0])]) + run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:]) diff --git a/wxPython/demo/LayoutConstraints.py b/wxPython/demo/LayoutConstraints.py index ec682a5a77..abd5e1a8b2 100644 --- a/wxPython/demo/LayoutConstraints.py +++ b/wxPython/demo/LayoutConstraints.py @@ -144,5 +144,5 @@ the constraint is wxAsIs, the dimension will not be changed. if __name__ == '__main__': import sys,os import run - run.main(['', os.path.basename(sys.argv[0])]) + run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:]) diff --git a/wxPython/demo/Layoutf.py b/wxPython/demo/Layoutf.py index 8958a533f0..b5b5e38581 100644 --- a/wxPython/demo/Layoutf.py +++ b/wxPython/demo/Layoutf.py @@ -64,5 +64,5 @@ overview = layoutf.Layoutf.__doc__ if __name__ == '__main__': import sys,os import run - run.main(['', os.path.basename(sys.argv[0])]) + run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:]) diff --git a/wxPython/demo/ListBox.py b/wxPython/demo/ListBox.py index ede7ce13b1..8ae15a76d6 100644 --- a/wxPython/demo/ListBox.py +++ b/wxPython/demo/ListBox.py @@ -154,5 +154,5 @@ independently of other selections). if __name__ == '__main__': import sys,os import run - run.main(['', os.path.basename(sys.argv[0])]) + run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:]) diff --git a/wxPython/demo/ListCtrl.py b/wxPython/demo/ListCtrl.py index fc99a93627..b46bc3d87a 100644 --- a/wxPython/demo/ListCtrl.py +++ b/wxPython/demo/ListCtrl.py @@ -492,5 +492,5 @@ selection is enabled) if __name__ == '__main__': import sys,os import run - run.main(['', os.path.basename(sys.argv[0])]) + run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:]) diff --git a/wxPython/demo/ListCtrl_virtual.py b/wxPython/demo/ListCtrl_virtual.py index 757575b34d..8d842da773 100644 --- a/wxPython/demo/ListCtrl_virtual.py +++ b/wxPython/demo/ListCtrl_virtual.py @@ -105,5 +105,5 @@ without limiting what can be done with the list control itself. if __name__ == '__main__': import sys,os import run - run.main(['', os.path.basename(sys.argv[0])]) + run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:]) diff --git a/wxPython/demo/Listbook.py b/wxPython/demo/Listbook.py index 67e82d8f90..cc3f2f77d9 100644 --- a/wxPython/demo/Listbook.py +++ b/wxPython/demo/Listbook.py @@ -112,7 +112,7 @@ wx.ListCtrl instead of a set of tabs. if __name__ == '__main__': import sys,os import run - run.main(['', os.path.basename(sys.argv[0])]) + run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:]) diff --git a/wxPython/demo/MDIWindows.py b/wxPython/demo/MDIWindows.py index fb68174246..8e47f24c02 100644 --- a/wxPython/demo/MDIWindows.py +++ b/wxPython/demo/MDIWindows.py @@ -59,4 +59,4 @@ showing how the MDI interface can be integrated into a SashWindow interface. if __name__ == '__main__': import sys,os import run - run.main(['', os.path.basename(sys.argv[0])]) + run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:]) diff --git a/wxPython/demo/MVCTree.py b/wxPython/demo/MVCTree.py index 93071461df..3f1f525633 100644 --- a/wxPython/demo/MVCTree.py +++ b/wxPython/demo/MVCTree.py @@ -75,4 +75,4 @@ demo, to avoid accidentally renaming files! if __name__ == '__main__': import sys,os import run - run.main(['', os.path.basename(sys.argv[0])]) + run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:]) diff --git a/wxPython/demo/Main.py b/wxPython/demo/Main.py index 76377ae3c1..a9c4c3bdd1 100644 --- a/wxPython/demo/Main.py +++ b/wxPython/demo/Main.py @@ -461,7 +461,7 @@ class wxPythonDemo(wx.Frame): self.CreateStatusBar(1, wx.ST_SIZEGRIP) splitter = wx.SplitterWindow(self, -1) - splitter2 = wx.SplitterWindow(splitter, -1) + splitter2 = wx.SplitterWindow(splitter, -1) ##, size=(20,20)) # Set up a log on the View Log Notebook page self.log = wx.TextCtrl(splitter2, -1, @@ -895,6 +895,7 @@ class MySplashScreen(wx.SplashScreen): self.Bind(wx.EVT_CLOSE, self.OnClose) def OnClose(self, evt): + self.Hide() frame = wxPythonDemo(None, -1, "wxPython: (A Demonstration)") frame.Show() evt.Skip() # Make sure the default handler runs too... diff --git a/wxPython/demo/Mask.py b/wxPython/demo/Mask.py index cf7123cb8f..3820c323b8 100644 --- a/wxPython/demo/Mask.py +++ b/wxPython/demo/Mask.py @@ -127,5 +127,5 @@ Context (dc) Blit() method's logic codes. if __name__ == '__main__': import sys,os import run - run.main(['', os.path.basename(sys.argv[0])]) + run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:]) diff --git a/wxPython/demo/MaskedEditControls.py b/wxPython/demo/MaskedEditControls.py index 278a302fb8..c20988837a 100644 --- a/wxPython/demo/MaskedEditControls.py +++ b/wxPython/demo/MaskedEditControls.py @@ -643,4 +643,4 @@ overview = """ if __name__ == "__main__": import sys,os import run - run.main(['', os.path.basename(sys.argv[0])]) + run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:]) diff --git a/wxPython/demo/MaskedNumCtrl.py b/wxPython/demo/MaskedNumCtrl.py index 81ad6cfe33..68dbb26687 100644 --- a/wxPython/demo/MaskedNumCtrl.py +++ b/wxPython/demo/MaskedNumCtrl.py @@ -327,4 +327,4 @@ overview = mnum.__doc__ if __name__ == '__main__': import sys,os import run - run.main(['', os.path.basename(sys.argv[0])]) + run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:]) diff --git a/wxPython/demo/Menu.py b/wxPython/demo/Menu.py index 3e1553e044..431ab66812 100644 --- a/wxPython/demo/Menu.py +++ b/wxPython/demo/Menu.py @@ -298,5 +298,5 @@ and GTK+ currently. if __name__ == '__main__': import sys,os import run - run.main(['', os.path.basename(sys.argv[0])]) + run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:]) diff --git a/wxPython/demo/MessageDialog.py b/wxPython/demo/MessageDialog.py index 2ac09775e5..ab36df8cdb 100644 --- a/wxPython/demo/MessageDialog.py +++ b/wxPython/demo/MessageDialog.py @@ -32,4 +32,4 @@ must be retrieved before the dialog is destroyed. if __name__ == '__main__': import sys,os import run - run.main(['', os.path.basename(sys.argv[0])]) + run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:]) diff --git a/wxPython/demo/MimeTypesManager.py b/wxPython/demo/MimeTypesManager.py index 4dc89e2571..9689030c24 100644 --- a/wxPython/demo/MimeTypesManager.py +++ b/wxPython/demo/MimeTypesManager.py @@ -339,4 +339,4 @@ For further information please consult the wxWindows documentation for if __name__ == '__main__': import sys,os import run - run.main(['', os.path.basename(sys.argv[0])]) + run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:]) diff --git a/wxPython/demo/MiniFrame.py b/wxPython/demo/MiniFrame.py index b337885342..7bdc8b1de8 100644 --- a/wxPython/demo/MiniFrame.py +++ b/wxPython/demo/MiniFrame.py @@ -48,4 +48,4 @@ same as a wx.Frame. if __name__ == '__main__': import sys,os import run - run.main(['', os.path.basename(sys.argv[0])]) + run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:]) diff --git a/wxPython/demo/MultiSash.py b/wxPython/demo/MultiSash.py index eb49ea455c..6af173b5ac 100644 --- a/wxPython/demo/MultiSash.py +++ b/wxPython/demo/MultiSash.py @@ -90,5 +90,5 @@ when desired. if __name__ == '__main__': import sys,os import run - run.main(['', os.path.basename(sys.argv[0])]) + run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:]) diff --git a/wxPython/demo/MultipleChoiceDialog.py b/wxPython/demo/MultipleChoiceDialog.py index 3407650814..831a054d19 100644 --- a/wxPython/demo/MultipleChoiceDialog.py +++ b/wxPython/demo/MultipleChoiceDialog.py @@ -77,4 +77,4 @@ methods applicable to that class. if __name__ == '__main__': import sys,os import run - run.main(['', os.path.basename(sys.argv[0])]) + run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:]) diff --git a/wxPython/demo/NewNamespace.py b/wxPython/demo/NewNamespace.py index 97b04d190c..15c4a752bb 100644 --- a/wxPython/demo/NewNamespace.py +++ b/wxPython/demo/NewNamespace.py @@ -43,5 +43,5 @@ introductory doc for using the new namespace. if __name__ == '__main__': import sys,os import run - run.main(['', os.path.basename(sys.argv[0])]) + run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:]) diff --git a/wxPython/demo/Notebook.py b/wxPython/demo/Notebook.py index 5102914318..c4dc0a5504 100644 --- a/wxPython/demo/Notebook.py +++ b/wxPython/demo/Notebook.py @@ -127,7 +127,7 @@ delete the window for a page that is currently managed by wx.Notebook. if __name__ == '__main__': import sys,os import run - run.main(['', os.path.basename(sys.argv[0])]) + run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:]) diff --git a/wxPython/demo/OGL.py b/wxPython/demo/OGL.py index 3dab78b679..32df0612ec 100644 --- a/wxPython/demo/OGL.py +++ b/wxPython/demo/OGL.py @@ -318,5 +318,5 @@ manipulation of simple and complex graphic images on a canvas. if __name__ == '__main__': import sys,os import run - run.main(['', os.path.basename(sys.argv[0])]) + run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:]) diff --git a/wxPython/demo/OOR.py b/wxPython/demo/OOR.py index fa746c10f9..547869a1c3 100644 --- a/wxPython/demo/OOR.py +++ b/wxPython/demo/OOR.py @@ -151,5 +151,5 @@ and the second will show #2 (working as of Python 2.3.2) if __name__ == '__main__': import sys,os import run - run.main(['', os.path.basename(sys.argv[0])]) + run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:]) diff --git a/wxPython/demo/PageSetupDialog.py b/wxPython/demo/PageSetupDialog.py index a496884795..bae4d0d81e 100644 --- a/wxPython/demo/PageSetupDialog.py +++ b/wxPython/demo/PageSetupDialog.py @@ -48,4 +48,4 @@ dialog is destroyed. if __name__ == '__main__': import sys,os import run - run.main(['', os.path.basename(sys.argv[0])]) + run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:]) diff --git a/wxPython/demo/PlotCanvas.py b/wxPython/demo/PlotCanvas.py index 9d0bf9f302..3c2a2a9ea9 100644 --- a/wxPython/demo/PlotCanvas.py +++ b/wxPython/demo/PlotCanvas.py @@ -48,4 +48,4 @@ overview = plot.__doc__ if __name__ == '__main__': import sys,os import run - run.main(['', os.path.basename(sys.argv[0])]) + run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:]) diff --git a/wxPython/demo/PopupControl.py b/wxPython/demo/PopupControl.py index 8b824b21f6..d96e1ec7d4 100644 --- a/wxPython/demo/PopupControl.py +++ b/wxPython/demo/PopupControl.py @@ -91,5 +91,5 @@ wx.PopupWindow should be used... if __name__ == '__main__': import sys,os import run - run.main(['', os.path.basename(sys.argv[0])]) + run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:]) diff --git a/wxPython/demo/PopupMenu.py b/wxPython/demo/PopupMenu.py index 0ff54a4bd9..ce4775c94d 100644 --- a/wxPython/demo/PopupMenu.py +++ b/wxPython/demo/PopupMenu.py @@ -152,5 +152,5 @@ overview = """ if __name__ == '__main__': import sys,os import run - run.main(['', os.path.basename(sys.argv[0])]) + run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:]) diff --git a/wxPython/demo/PopupWindow.py b/wxPython/demo/PopupWindow.py index 83d7056a6e..39d4080c4c 100644 --- a/wxPython/demo/PopupWindow.py +++ b/wxPython/demo/PopupWindow.py @@ -210,5 +210,5 @@ overview = """\ if __name__ == '__main__': import sys,os import run - run.main(['', os.path.basename(sys.argv[0])]) + run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:]) diff --git a/wxPython/demo/PrintDialog.py b/wxPython/demo/PrintDialog.py index 04540625f0..4e602f2bda 100644 --- a/wxPython/demo/PrintDialog.py +++ b/wxPython/demo/PrintDialog.py @@ -38,4 +38,4 @@ until you have everything you need from it. if __name__ == '__main__': import sys,os import run - run.main(['', os.path.basename(sys.argv[0])]) + run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:]) diff --git a/wxPython/demo/PrintFramework.py b/wxPython/demo/PrintFramework.py index ea3881e68f..545d267dcb 100644 --- a/wxPython/demo/PrintFramework.py +++ b/wxPython/demo/PrintFramework.py @@ -224,5 +224,5 @@ framework in wxPython. if __name__ == '__main__': import sys,os import run - run.main(['', os.path.basename(sys.argv[0])]) + run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:]) diff --git a/wxPython/demo/Process.py b/wxPython/demo/Process.py index af9e4cd9f4..beea93893c 100644 --- a/wxPython/demo/Process.py +++ b/wxPython/demo/Process.py @@ -158,4 +158,4 @@ child process to exit its main loop. if __name__ == '__main__': import sys,os import run - run.main(['', os.path.basename(sys.argv[0])]) + run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:]) diff --git a/wxPython/demo/ProgressDialog.py b/wxPython/demo/ProgressDialog.py index ce4220191b..6a5fe70cfe 100644 --- a/wxPython/demo/ProgressDialog.py +++ b/wxPython/demo/ProgressDialog.py @@ -59,4 +59,4 @@ If not then you may progress blissfully onward. if __name__ == '__main__': import sys,os import run - run.main(['', os.path.basename(sys.argv[0])]) + run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:]) diff --git a/wxPython/demo/PyColourChooser.py b/wxPython/demo/PyColourChooser.py index 0bad427a48..32921e1548 100644 --- a/wxPython/demo/PyColourChooser.py +++ b/wxPython/demo/PyColourChooser.py @@ -56,4 +56,4 @@ it my way at: mgilfix@eecs.tufts.edu if __name__ == '__main__': import sys,os import run - run.main(['', os.path.basename(sys.argv[0])]) + run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:]) diff --git a/wxPython/demo/PyCrust.py b/wxPython/demo/PyCrust.py index 9aa95fcd0c..3fd96ebed6 100644 --- a/wxPython/demo/PyCrust.py +++ b/wxPython/demo/PyCrust.py @@ -16,5 +16,5 @@ overview = py.filling.__doc__ + "\n\n" + py.crust.__doc__ if __name__ == '__main__': import sys,os import run - run.main(['', os.path.basename(sys.argv[0])]) + run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:]) diff --git a/wxPython/demo/PyPlot.py b/wxPython/demo/PyPlot.py index ac2c19205c..c22a08e34f 100644 --- a/wxPython/demo/PyPlot.py +++ b/wxPython/demo/PyPlot.py @@ -106,5 +106,5 @@ come with the class itself. if __name__ == '__main__': import sys,os import run - run.main(['', os.path.basename(sys.argv[0])]) + run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:]) diff --git a/wxPython/demo/PyShell.py b/wxPython/demo/PyShell.py index 7fe18707f6..0c9fa949c0 100644 --- a/wxPython/demo/PyShell.py +++ b/wxPython/demo/PyShell.py @@ -17,5 +17,5 @@ overview = py.shell.__doc__ if __name__ == '__main__': import sys,os import run - run.main(['', os.path.basename(sys.argv[0])]) + run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:]) diff --git a/wxPython/demo/PythonEvents.py b/wxPython/demo/PythonEvents.py index c83ac1afc6..b65a9183e6 100644 --- a/wxPython/demo/PythonEvents.py +++ b/wxPython/demo/PythonEvents.py @@ -104,5 +104,5 @@ is required if you used the *.Bind() method of setting up event handlers. if __name__ == '__main__': import sys,os import run - run.main(['', os.path.basename(sys.argv[0])]) + run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:]) diff --git a/wxPython/demo/RadioBox.py b/wxPython/demo/RadioBox.py index 2d925375d2..6f728dccb1 100644 --- a/wxPython/demo/RadioBox.py +++ b/wxPython/demo/RadioBox.py @@ -62,5 +62,5 @@ label. if __name__ == '__main__': import sys,os import run - run.main(['', os.path.basename(sys.argv[0])]) + run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:]) diff --git a/wxPython/demo/RadioButton.py b/wxPython/demo/RadioButton.py index e74b0f52e6..c76dd4a804 100644 --- a/wxPython/demo/RadioButton.py +++ b/wxPython/demo/RadioButton.py @@ -122,5 +122,5 @@ added to that group by the framework. if __name__ == '__main__': import sys,os import run - run.main(['', os.path.basename(sys.argv[0])]) + run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:]) diff --git a/wxPython/demo/RightTextCtrl.py b/wxPython/demo/RightTextCtrl.py index aa8e3e8bb1..c24da5c13c 100644 --- a/wxPython/demo/RightTextCtrl.py +++ b/wxPython/demo/RightTextCtrl.py @@ -59,4 +59,4 @@ overview = right.__doc__ if __name__ == '__main__': import sys,os import run - run.main(['', os.path.basename(sys.argv[0])]) + run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:]) diff --git a/wxPython/demo/RowColSizer.py b/wxPython/demo/RowColSizer.py index efdb3c754f..d1fb3f56f8 100644 --- a/wxPython/demo/RowColSizer.py +++ b/wxPython/demo/RowColSizer.py @@ -88,5 +88,5 @@ overview = rcs.__doc__ if __name__ == '__main__': import sys,os import run - run.main(['', os.path.basename(sys.argv[0])]) + run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:]) diff --git a/wxPython/demo/SashWindow.py b/wxPython/demo/SashWindow.py index aee3be673a..7bb72ee785 100644 --- a/wxPython/demo/SashWindow.py +++ b/wxPython/demo/SashWindow.py @@ -143,4 +143,4 @@ in more detail. if __name__ == '__main__': import sys,os import run - run.main(['', os.path.basename(sys.argv[0])]) + run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:]) diff --git a/wxPython/demo/ScrolledMessageDialog.py b/wxPython/demo/ScrolledMessageDialog.py index 711fbecd0c..65647f8cae 100644 --- a/wxPython/demo/ScrolledMessageDialog.py +++ b/wxPython/demo/ScrolledMessageDialog.py @@ -32,4 +32,4 @@ by wxDialog. if __name__ == '__main__': import sys,os import run - run.main(['', os.path.basename(sys.argv[0])]) + run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:]) diff --git a/wxPython/demo/ScrolledPanel.py b/wxPython/demo/ScrolledPanel.py index cab8cc8eb2..448d88b4e0 100644 --- a/wxPython/demo/ScrolledPanel.py +++ b/wxPython/demo/ScrolledPanel.py @@ -112,4 +112,4 @@ mangement that wx.ScrolledWindow lacks. if __name__ == '__main__': import sys,os import run - run.main(['', os.path.basename(sys.argv[0])]) + run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:]) diff --git a/wxPython/demo/ScrolledWindow.py b/wxPython/demo/ScrolledWindow.py index be75668981..a38500ea5e 100644 --- a/wxPython/demo/ScrolledWindow.py +++ b/wxPython/demo/ScrolledWindow.py @@ -238,5 +238,5 @@ thumb sizes and ranges according to the area in view. if __name__ == '__main__': import sys,os import run - run.main(['', os.path.basename(sys.argv[0])]) + run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:]) diff --git a/wxPython/demo/ShapedWindow.py b/wxPython/demo/ShapedWindow.py index 137481e28c..98d969a2e2 100644 --- a/wxPython/demo/ShapedWindow.py +++ b/wxPython/demo/ShapedWindow.py @@ -118,5 +118,5 @@ sensitive to the mouse in those areas either. if __name__ == '__main__': import sys,os import run - run.main(['', os.path.basename(sys.argv[0])]) + run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:]) diff --git a/wxPython/demo/SingleChoiceDialog.py b/wxPython/demo/SingleChoiceDialog.py index 157e172541..0f20cdcf14 100644 --- a/wxPython/demo/SingleChoiceDialog.py +++ b/wxPython/demo/SingleChoiceDialog.py @@ -34,5 +34,5 @@ destroy the dialog. if __name__ == '__main__': import sys,os import run - run.main(['', os.path.basename(sys.argv[0])]) + run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:]) diff --git a/wxPython/demo/Slider.py b/wxPython/demo/Slider.py index cea042fad0..7be4bdb517 100644 --- a/wxPython/demo/Slider.py +++ b/wxPython/demo/Slider.py @@ -44,5 +44,5 @@ In Windows 95, the track bar control is used. if __name__ == '__main__': import sys,os import run - run.main(['', os.path.basename(sys.argv[0])]) + run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:]) diff --git a/wxPython/demo/Sound.py b/wxPython/demo/Sound.py index fde55f785c..48ed8d0442 100644 --- a/wxPython/demo/Sound.py +++ b/wxPython/demo/Sound.py @@ -56,4 +56,4 @@ that drives the playing of the sound can come from anywhere. if __name__ == '__main__': import sys,os import run - run.main(['', os.path.basename(sys.argv[0])]) + run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:]) diff --git a/wxPython/demo/SpinButton.py b/wxPython/demo/SpinButton.py index 9f09e5d8f2..4366d3c9d8 100644 --- a/wxPython/demo/SpinButton.py +++ b/wxPython/demo/SpinButton.py @@ -54,4 +54,4 @@ range is supported. if __name__ == '__main__': import sys,os import run - run.main(['', os.path.basename(sys.argv[0])]) + run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:]) diff --git a/wxPython/demo/SpinCtrl.py b/wxPython/demo/SpinCtrl.py index 0104fc1f7a..23d20cb31f 100644 --- a/wxPython/demo/SpinCtrl.py +++ b/wxPython/demo/SpinCtrl.py @@ -42,4 +42,4 @@ range is supported. if __name__ == '__main__': import sys,os import run - run.main(['', os.path.basename(sys.argv[0])]) + run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:]) diff --git a/wxPython/demo/SplitTree.py b/wxPython/demo/SplitTree.py index c7666ef816..da4156b47a 100644 --- a/wxPython/demo/SplitTree.py +++ b/wxPython/demo/SplitTree.py @@ -145,5 +145,5 @@ also be useful by themselves. if __name__ == '__main__': import sys,os import run - run.main(['', os.path.basename(sys.argv[0])]) + run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:]) diff --git a/wxPython/demo/SplitterWindow.py b/wxPython/demo/SplitterWindow.py index 565bdd4047..1f1e19a2e7 100644 --- a/wxPython/demo/SplitterWindow.py +++ b/wxPython/demo/SplitterWindow.py @@ -5,7 +5,10 @@ import wx class MySplitter(wx.SplitterWindow): def __init__(self, parent, ID, log): - wx.SplitterWindow.__init__(self, parent, ID) + wx.SplitterWindow.__init__(self, parent, ID, + style = wx.SP_3D + #| wx.SP_LIVE_UPDATE + ) self.log = log self.Bind(wx.EVT_SPLITTER_SASH_POS_CHANGED, self.OnSashChanged) @@ -13,14 +16,13 @@ class MySplitter(wx.SplitterWindow): def OnSashChanged(self, evt): self.log.WriteText("sash changed to %s\n" % str(evt.GetSashPosition())) - # uncomment this to not allow the change - #evt.SetSashPosition(-1) def OnSashChanging(self, evt): self.log.WriteText("sash changing to %s\n" % str(evt.GetSashPosition())) # uncomment this to not allow the change #evt.SetSashPosition(-1) + #--------------------------------------------------------------------------- def runTest(frame, nb, log): @@ -28,14 +30,15 @@ def runTest(frame, nb, log): p1 = wx.Window(splitter, -1) p1.SetBackgroundColour(wx.RED) - wx.StaticText(p1, -1, "Panel One", (5,5)).SetBackgroundColour(wx.RED) + wx.StaticText(p1, -1, "Panel One", (5,5))#.SetBackgroundColour(wx.RED) p2 = wx.Window(splitter, -1) p2.SetBackgroundColour(wx.BLUE) - wx.StaticText(p2, -1, "Panel Two", (5,5)).SetBackgroundColour(wx.BLUE) + p2.SetForegroundColour(wx.WHITE) + wx.StaticText(p2, -1, "Panel Two", (5,5))#.SetBackgroundColour(wx.BLUE) splitter.SetMinimumPaneSize(20) - splitter.SplitVertically(p1, p2, 100) + splitter.SplitVertically(p1, p2, -100) return splitter @@ -52,5 +55,5 @@ either programmatically or via the wx.SplitterWindow user interface. if __name__ == '__main__': import sys,os import run - run.main(['', os.path.basename(sys.argv[0])]) + run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:]) diff --git a/wxPython/demo/StaticBitmap.py b/wxPython/demo/StaticBitmap.py index e6492edc15..7bec8cd74c 100644 --- a/wxPython/demo/StaticBitmap.py +++ b/wxPython/demo/StaticBitmap.py @@ -44,4 +44,4 @@ A bitmap can be derived from most image formats using the wx.Image class. if __name__ == '__main__': import sys,os import run - run.main(['', os.path.basename(sys.argv[0])]) + run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:]) diff --git a/wxPython/demo/StaticText.py b/wxPython/demo/StaticText.py index 8bee69d258..6cc9edd3ff 100644 --- a/wxPython/demo/StaticText.py +++ b/wxPython/demo/StaticText.py @@ -51,5 +51,5 @@ A StaticText control displays one or more lines of read-only text. if __name__ == '__main__': import sys,os import run - run.main(['', os.path.basename(sys.argv[0])]) + run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:]) diff --git a/wxPython/demo/StatusBar.py b/wxPython/demo/StatusBar.py index 64aaf4c848..6cfa844648 100644 --- a/wxPython/demo/StatusBar.py +++ b/wxPython/demo/StatusBar.py @@ -119,4 +119,4 @@ field has a clock that shows the current time when it is enabled. if __name__ == '__main__': import sys,os import run - run.main(['', os.path.basename(sys.argv[0])]) + run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:]) diff --git a/wxPython/demo/StyledTextCtrl_1.py b/wxPython/demo/StyledTextCtrl_1.py index a6e325e61c..0319d6e31d 100644 --- a/wxPython/demo/StyledTextCtrl_1.py +++ b/wxPython/demo/StyledTextCtrl_1.py @@ -288,5 +288,5 @@ be helpful. if __name__ == '__main__': import sys,os import run - run.main(['', os.path.basename(sys.argv[0])]) + run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:]) diff --git a/wxPython/demo/StyledTextCtrl_2.py b/wxPython/demo/StyledTextCtrl_2.py index 2258172d02..2ad4bf5c22 100644 --- a/wxPython/demo/StyledTextCtrl_2.py +++ b/wxPython/demo/StyledTextCtrl_2.py @@ -386,7 +386,7 @@ be helpful. if __name__ == '__main__': import sys,os import run - run.main(['', os.path.basename(sys.argv[0])]) + run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:]) diff --git a/wxPython/demo/TablePrint.py b/wxPython/demo/TablePrint.py index 58e483e0a8..683ba911e9 100644 --- a/wxPython/demo/TablePrint.py +++ b/wxPython/demo/TablePrint.py @@ -207,5 +207,5 @@ when the framework allows for it. if __name__ == '__main__': import sys,os import run - run.main(['', os.path.basename(sys.argv[0])]) + run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:]) diff --git a/wxPython/demo/TextCtrl.py b/wxPython/demo/TextCtrl.py index c9798237fb..77fc77b9e5 100644 --- a/wxPython/demo/TextCtrl.py +++ b/wxPython/demo/TextCtrl.py @@ -169,5 +169,5 @@ text masking for such things as passwords. if __name__ == '__main__': import sys,os import run - run.main(['', os.path.basename(sys.argv[0])]) + run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:]) diff --git a/wxPython/demo/TextEntryDialog.py b/wxPython/demo/TextEntryDialog.py index b435bfd5a8..6f48afbacd 100644 --- a/wxPython/demo/TextEntryDialog.py +++ b/wxPython/demo/TextEntryDialog.py @@ -35,4 +35,4 @@ destroying the dialog. if __name__ == '__main__': import sys,os import run - run.main(['', os.path.basename(sys.argv[0])]) + run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:]) diff --git a/wxPython/demo/Threads.py b/wxPython/demo/Threads.py index 8af17bf870..49654f96a7 100644 --- a/wxPython/demo/Threads.py +++ b/wxPython/demo/Threads.py @@ -250,5 +250,5 @@ thread. if __name__ == '__main__': import sys,os import run - run.main(['', os.path.basename(sys.argv[0])]) + run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:]) diff --git a/wxPython/demo/Throbber.py b/wxPython/demo/Throbber.py index 3096c4850c..f855a2dfac 100644 --- a/wxPython/demo/Throbber.py +++ b/wxPython/demo/Throbber.py @@ -184,4 +184,4 @@ overview = """ if __name__ == '__main__': import sys,os import run - run.main(['', os.path.basename(sys.argv[0])]) + run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:]) diff --git a/wxPython/demo/TimeCtrl.py b/wxPython/demo/TimeCtrl.py index 60c86abce8..3f7098d0ed 100644 --- a/wxPython/demo/TimeCtrl.py +++ b/wxPython/demo/TimeCtrl.py @@ -231,5 +231,5 @@ overview = timectl.__doc__ if __name__ == '__main__': import sys,os import run - run.main(['', os.path.basename(sys.argv[0])]) + run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:]) diff --git a/wxPython/demo/Timer.py b/wxPython/demo/Timer.py index 3c88d92a39..af5e77e43d 100644 --- a/wxPython/demo/Timer.py +++ b/wxPython/demo/Timer.py @@ -260,7 +260,7 @@ for backwards compatibility. if __name__ == '__main__': import sys,os import run - run.main(['', os.path.basename(sys.argv[0])]) + run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:]) diff --git a/wxPython/demo/ToggleButton.py b/wxPython/demo/ToggleButton.py index d69b015067..74323f5103 100644 --- a/wxPython/demo/ToggleButton.py +++ b/wxPython/demo/ToggleButton.py @@ -57,4 +57,4 @@ This class is only available under wxMSW and wxGTK currently. if __name__ == '__main__': import sys,os import run - run.main(['', os.path.basename(sys.argv[0])]) + run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:]) diff --git a/wxPython/demo/ToolBar.py b/wxPython/demo/ToolBar.py index 7707de09de..4c0414128f 100644 --- a/wxPython/demo/ToolBar.py +++ b/wxPython/demo/ToolBar.py @@ -160,5 +160,5 @@ is provided in wx.lib.floatbar, but it is not formally supported. if __name__ == '__main__': import sys,os import run - run.main(['', os.path.basename(sys.argv[0])]) + run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:]) diff --git a/wxPython/demo/TreeCtrl.py b/wxPython/demo/TreeCtrl.py index 78cb5231e6..84fe4ab218 100644 --- a/wxPython/demo/TreeCtrl.py +++ b/wxPython/demo/TreeCtrl.py @@ -198,5 +198,5 @@ wx.TreeItemId handles. if __name__ == '__main__': import sys,os import run - run.main(['', os.path.basename(sys.argv[0])]) + run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:]) diff --git a/wxPython/demo/TreeListCtrl.py b/wxPython/demo/TreeListCtrl.py index 9295a09e96..de7fe1b11d 100644 --- a/wxPython/demo/TreeListCtrl.py +++ b/wxPython/demo/TreeListCtrl.py @@ -113,5 +113,5 @@ if __name__ == '__main__': #raw_input("Press enter...") import sys,os import run - run.main(['', os.path.basename(sys.argv[0])]) + run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:]) diff --git a/wxPython/demo/URLDragAndDrop.py b/wxPython/demo/URLDragAndDrop.py index 6ed2d17c81..863e746a7a 100644 --- a/wxPython/demo/URLDragAndDrop.py +++ b/wxPython/demo/URLDragAndDrop.py @@ -126,5 +126,5 @@ overview = """\ if __name__ == '__main__': import sys,os import run - run.main(['', os.path.basename(sys.argv[0])]) + run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:]) diff --git a/wxPython/demo/Unicode.py b/wxPython/demo/Unicode.py index ac5eca5385..3b15a18794 100644 --- a/wxPython/demo/Unicode.py +++ b/wxPython/demo/Unicode.py @@ -145,5 +145,5 @@ and then pass the unicode to the wxPython method. if __name__ == '__main__': import sys,os import run - run.main(['', os.path.basename(sys.argv[0])]) + run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:]) diff --git a/wxPython/demo/VListBox.py b/wxPython/demo/VListBox.py index f54e185508..30cec2b5f3 100644 --- a/wxPython/demo/VListBox.py +++ b/wxPython/demo/VListBox.py @@ -14,7 +14,8 @@ class MyVListBox(wx.VListBox): if self.GetSelection() == n: c = wx.SystemSettings.GetColour(wx.SYS_COLOUR_HIGHLIGHTTEXT) else: - c = self.GetForegroundColour()#wx.SystemSettings.GetColour(wx.SYS_COLOUR_HIGHLIGHTTEXT) + c = self.GetForegroundColour()#wx.SystemSettings.GetColour(wx.SYS_COLOUR_HIGHLIGHTTEXT) + dc.SetFont(self.GetFont()) dc.SetTextForeground(c) dc.DrawLabel(self._getItemText(n), rect, wx.ALIGN_LEFT | wx.ALIGN_CENTER_VERTICAL) @@ -127,5 +128,5 @@ of HTML for each item when requested. if __name__ == '__main__': import sys,os import run - run.main(['', os.path.basename(sys.argv[0])]) + run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:]) diff --git a/wxPython/demo/Validator.py b/wxPython/demo/Validator.py index 7215e07f18..d31296c7be 100644 --- a/wxPython/demo/Validator.py +++ b/wxPython/demo/Validator.py @@ -235,5 +235,5 @@ between a class of control, and application data. if __name__ == '__main__': import sys,os import run - run.main(['', os.path.basename(sys.argv[0])]) + run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:]) diff --git a/wxPython/demo/Wizard.py b/wxPython/demo/Wizard.py index 697fe9c2d0..a2f98142da 100644 --- a/wxPython/demo/Wizard.py +++ b/wxPython/demo/Wizard.py @@ -237,5 +237,5 @@ it is important to keep them as simple as possible. if __name__ == '__main__': import sys,os import run - run.main(['', os.path.basename(sys.argv[0])]) + run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:]) diff --git a/wxPython/demo/XMLtreeview.py b/wxPython/demo/XMLtreeview.py index 0af13a34c4..113360e2d2 100644 --- a/wxPython/demo/XMLtreeview.py +++ b/wxPython/demo/XMLtreeview.py @@ -117,4 +117,4 @@ overview = """\ if __name__ == '__main__': import sys,os import run - run.main(['', os.path.basename(sys.argv[0])]) + run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:]) diff --git a/wxPython/demo/XmlResource.py b/wxPython/demo/XmlResource.py index 15e96eb42e..5d241b1dbc 100644 --- a/wxPython/demo/XmlResource.py +++ b/wxPython/demo/XmlResource.py @@ -72,5 +72,5 @@ overview = """ if __name__ == '__main__': import sys,os import run - run.main(['', os.path.basename(sys.argv[0])]) + run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:]) diff --git a/wxPython/demo/XmlResourceHandler.py b/wxPython/demo/XmlResourceHandler.py index b15defd373..1f415e35a6 100644 --- a/wxPython/demo/XmlResourceHandler.py +++ b/wxPython/demo/XmlResourceHandler.py @@ -181,5 +181,5 @@ to create instances of that class when the resource is loaded. if __name__ == '__main__': import sys,os import run - run.main(['', os.path.basename(sys.argv[0])]) + run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:]) diff --git a/wxPython/demo/XmlResourceSubclass.py b/wxPython/demo/XmlResourceSubclass.py index ed0390f455..412aa9da7c 100644 --- a/wxPython/demo/XmlResourceSubclass.py +++ b/wxPython/demo/XmlResourceSubclass.py @@ -100,5 +100,5 @@ do that. if __name__ == '__main__': import sys,os import run - run.main(['', os.path.basename(sys.argv[0])]) + run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:]) diff --git a/wxPython/demo/data/widgetTest.htm b/wxPython/demo/data/widgetTest.htm index eb375b59ea..38e0297189 100644 --- a/wxPython/demo/data/widgetTest.htm +++ b/wxPython/demo/data/widgetTest.htm @@ -58,7 +58,7 @@ parameter value. Source code is here.


Recognize this one?
- +


diff --git a/wxPython/demo/run.py b/wxPython/demo/run.py index 0e238b55fc..fb9b70a80f 100755 --- a/wxPython/demo/run.py +++ b/wxPython/demo/run.py @@ -40,9 +40,10 @@ class Log: class RunDemoApp(wx.App): - def __init__(self, name, module): + def __init__(self, name, module, useShell): self.name = name self.demoModule = module + self.useShell = useShell wx.App.__init__(self, 0) @@ -62,6 +63,11 @@ class RunDemoApp(wx.App): self.Bind(wx.EVT_MENU, self.OnButton, item) menuBar.Append(menu, "&File") + ns = {} + ns['app'] = self + ns['module'] = self.demoModule + ns['frame'] = frame + frame.SetMenuBar(menuBar) frame.Show(True) frame.Bind(wx.EVT_CLOSE, self.OnCloseFrame) @@ -75,11 +81,15 @@ class RunDemoApp(wx.App): frame.SetSize((640, 480)) win.SetFocus() self.window = win + ns['win'] = win + frect = frame.GetRect() else: # otherwise the demo made its own frame, so just put a # button in this one if hasattr(frame, 'otherWin'): + ns['win'] = frame.otherWin + frect = frame.otherWin.GetRect() p = wx.Panel(frame, -1) b = wx.Button(p, -1, " Exit ", (10,10)) p.Fit() @@ -96,6 +106,23 @@ class RunDemoApp(wx.App): self.frame = frame #wx.Log_SetActiveTarget(wx.LogStderr()) #wx.Log_SetTraceMask(wx.TraceMessages) + + if self.useShell: + # Make a PyShell window, and position it below our test window + from wx import py + shell = py.shell.ShellFrame(None, locals=ns) + frect.OffsetXY(0, frect.height) + frect.height = 400 + shell.SetRect(frect) + shell.Show() + + # Hook the close event of the test window so that we close + # the shell at the same time + def CloseShell(evt): + shell.Close() + evt.Skip() + frame.Bind(wx.EVT_CLOSE, CloseShell) + return True @@ -113,6 +140,13 @@ class RunDemoApp(wx.App): def main(argv): + useShell = False + for x in range(len(sys.argv)): + if sys.argv[x] in ['--shell', '-shell', '-s']: + useShell = True + del sys.argv[x] + break + if len(argv) < 2: print "Please specify a demo module name on the command-line" raise SystemExit @@ -121,7 +155,7 @@ def main(argv): module = __import__(name) - app = RunDemoApp(name, module) + app = RunDemoApp(name, module, useShell) app.MainLoop() diff --git a/wxPython/demo/template.py b/wxPython/demo/template.py index 8be058bfee..3019d1f42e 100644 --- a/wxPython/demo/template.py +++ b/wxPython/demo/template.py @@ -29,5 +29,5 @@ overview = """ if __name__ == '__main__': import sys,os import run - run.main(['', os.path.basename(sys.argv[0])]) + run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:]) diff --git a/wxPython/demo/templateold.py b/wxPython/demo/templateold.py index 9be55905b9..b02918a8ed 100644 --- a/wxPython/demo/templateold.py +++ b/wxPython/demo/templateold.py @@ -29,5 +29,5 @@ overview = """ if __name__ == '__main__': import sys,os import run - run.main(['', os.path.basename(sys.argv[0])]) + run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:]) diff --git a/wxPython/demo/widgetTest.py b/wxPython/demo/widgetTest.py index 052b3ed8e8..f7c60256c2 100644 --- a/wxPython/demo/widgetTest.py +++ b/wxPython/demo/widgetTest.py @@ -65,5 +65,5 @@ def runTest(frame, nb, log): if __name__ == '__main__': import sys,os import run - run.main(['', os.path.basename(sys.argv[0])]) + run.main(['', os.path.basename(sys.argv[0])] + sys.argv[1:]) -- 2.45.2