WxPython questions.
Omri Schwarz
ocschwar at mit.edu
Fri Jun 15 07:39:06 EDT 2001
"Alex Martelli" <aleaxit at yahoo.com> writes:
> "Omri Schwarz" <ocschwar at mit.edu> wrote in message
> news:octofrqcedk.fsf at mint-square.mit.edu...
> ...
> > So my question is, is there a more interactive way to
> > play around with wxPython?
>
> Sure! Just remember that an EMPTY line typed to the
> interactive interpreter tells the interpreter that
> the compound-statement is finished, as witness the
> change of prompt...:
Aye! Aye! Aye!
Can you tell I'm switching from Perl or what!
Thanks! I'll take your advice for future playtime!
> > >>> class MyFrame(wxFrame):
> > ... def __init__(self, parent, ID, title):
> > ... wxFrame.__init__(self, parent, ID, title,
> > ... wxDefaultPosition, wxSize(200, 150))
> > ... self.CreateStatusBar()
> > ... self.SetStatusText("This is the statusbar")
> > ...
>
> Here you presumably entered an empty line, and so...:
>
> > >>> menu = wxMenu()
>
> ...the def and class statements are finished, as evidenced
> by the prompt being back to >>>. Just avoid empty lines
> except when you *ARE* finished with a compound statement!
>
> It will be difficult to edit errors &c when working this
> way. I suggest you keep two texboxes/terminal-emulator
> windows/commandboxes/dosboxes/whatever. Use one to write
> small textfiles with your editor of choice, the other to
> hold the interactive session in the same directory, and
> use Python function execfile to 'gobble' into the
> interactive session the textfiles you're editing...
Will do. Thanks!
--
Omri Schwarz --- ocscwar at mit.edu ('h' before war)
Timeless wisdom of biomedical engineering: "Noise is principally
due to the presence of the patient." -- R.F. Farr
More information about the Python-list
mailing list