[Tutor] wxPython newbie
alan.gauld@bt.com
alan.gauld@bt.com
Thu Jan 9 12:44:49 2003
>
>When in doubt print it out is my motto.
>
> And my motto is "When in doubt, learn the right way
> to do it!" ;)
Sure but a good way to find out whats happening
in Python code is via python... Its one of its strongest
features that almost anything can be printed.
> > res = d.ShowModal()
> > print res
>
> Because it will just be a stupid digit that doesn't
> mean anything to whoever reads the code.
Well, it might be, but then again it could be a string
"Yes" or "No" which is, ISTR, how TKinter dialogs respond...
> >See what gets printed and substitute in your program...
> Better to use wxID_YES, wxID_NO, wxID_OK or wxID_CANCEL.
Absolutely. If there are defined constats then use the
definitions - or at least define your own if they don't
already exist. But when you don't even know what type of
response youll get, print is the best solution.
Alan g.