X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7fa23c09cdf8b4cbccf730a6e53c7688f79d250b..a8cb1a4947bbbf5e18ce52448f4c3bb4cff4daee:/wxPython/docs/wxPackage.html?ds=sidebyside diff --git a/wxPython/docs/wxPackage.html b/wxPython/docs/wxPackage.html index 8969840b20..82d666958c 100644 --- a/wxPython/docs/wxPackage.html +++ b/wxPython/docs/wxPackage.html @@ -3,7 +3,7 @@
- +This change is being made for a couple of reasons. The first reason -is to discourage the use of import *, which is a dangerous +is to discourage the use of import *, which is a dangerous technique that can create name conflicts and bloated namespaces.
The second reason is to remove what some perceive to be a "wart." For example, the following code is rather ugly in that the "wx" prefix on @@ -164,13 +164,13 @@ replace.
The wxPython demo application and most of the sample apps have been -converted to use the new import wx style of programming with +converted to use the new import wx style of programming with wxPython, so there are lots of examples to look at and to play with. -Here is one of them, it is the simple sample.
+Here is one of them, it is the simple sample.#---------------------------------------------------------------------- -# A very simple wxPython example. Just a wxFrame, wxPanel, -# wxStaticText, wxButton, and a wxBoxSizer, but it shows the basic +# A very simple wxPython example. Just a wx.Frame, wx.Panel, +# wx.StaticText, wx.Button, and a wx.BoxSizer, but it shows the basic # structure of any wxPython application. #---------------------------------------------------------------------- @@ -244,11 +244,14 @@ class MyFrame(wx.Frame): class MyApp(wx.App): def OnInit(self): frame = MyFrame(None, "Simple wxPython App") - frame.Show(True) self.SetTopWindow(frame) + + print "Print statements go to this stdout window by default." + + frame.Show(True) return True -app = MyApp(True) +app = MyApp(redirect=True) app.MainLoop()