X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d4b73b1b8e585418459362c9bf9173aa21da8c41..68fc5c8025e38b9d827383fbfe7ce509ae331c1f:/wxPython/wx/lib/infoframe.py?ds=sidebyside diff --git a/wxPython/wx/lib/infoframe.py b/wxPython/wx/lib/infoframe.py index b1352b437d..9b62ba6f80 100644 --- a/wxPython/wx/lib/infoframe.py +++ b/wxPython/wx/lib/infoframe.py @@ -32,23 +32,25 @@ Please note that, like wxPyOnDemandOutputWindow, the instance is not itself a subclass of wxWindow: when the window is open (and ONLY then), it's "frame" attribute is the actual instance of wFrame... -Typical usage: +Typical usage:: + from wxPython.lib.infoframe import * ... # ... modify your wxApp as follows: class myApp(wxApp): outputWindowClass = PyInformationalMessagesFrame ... + If you're running on Linux, you'll also have to supply an argument 1 to your constructor of myApp to redirect stdout/stderr to this window (it's done automatically for you on Windows). If you don't want to redirect stdout/stderr, but use the class directly: do -it this way: +it this way:: InformationalMessagesFrame = PyInformationalMessagesFrame\ ([options from progname (default ""), - txt (default "informational - messages"]) + txt (default "informational messages"]) + #^^^^ early in the program ... InformationalMessagesFrame([comma-separated list of items to @@ -404,7 +406,7 @@ class PyInformationalMessagesFrame: self.CloseFile() dlg = wx.FileDialog(self.frame, "Choose a new log file", self.dir,"","*", - wx.SAVE | wx.HIDE_READONLY | wx.OVERWRITE_PROMPT) + wx.SAVE | wx.OVERWRITE_PROMPT) if dlg.ShowModal() == wx.ID_CANCEL: dlg.Destroy() return 0