[visionegg] Re: wxPython question
- From: Christoph Lehmann <lehmann@xxxxxxxxxxxx>
- To: Sol Simpson <sol.simpson@xxxxxxxxxxxxxxx>,visionegg@xxxxxxxxxxxxx
- Date: Wed, 27 Aug 2003 08:34:05 +0200
I succeeded with the following lines:
from wxPython.wx import *
app = wxPySimpleApp()
dlg = wxTextEntryDialog(None,"subject id","question",'')
if dlg.ShowModal() == wxID_OK:
subj_id = dlg.GetValue()
else:
print "So sad"
dlg.Destroy()
print subj_id
thanks for your hints
christoph
On Tue, 2003-08-26 at 20:25, Sol Simpson wrote:
> The odd thing is that the line giving the error (app = wxPySimpleApp()) was
> also in your original code, did it not give an error then?
>
> thanks,
>
> Sol
>
> -----Original Message-----
> From: visionegg-bounce@xxxxxxxxxxxxx
> [mailto:visionegg-bounce@xxxxxxxxxxxxx]On Behalf Of Christoph Lehmann
> Sent: Tuesday, August 26, 2003 10:29 AM
> To: sol.simpson@xxxxxxxxxxxxxxx; visionegg@xxxxxxxxxxxxx
> Subject: [visionegg] Re: wxPython question
>
>
> with:
>
>
> from wxPython.wx import *
>
> def userInputDialog(question,title,default=""):
> app = wxPySimpleApp()
> dlg = wxTextEntryDialog(None,question,title,default)
>
> if dlg.ShowModal() == wxID_OK:
> dlg.Destroy()
> return dlg.GetValue()
>
> dlg.Destroy()
> return None
>
> I get:
>
> [christoph@christophl christoph]$ python test2.py
> File "test2.py", line 4
> app = wxPySimpleApp()
> ^
> SyntaxError: invalid syntax
>
> thanks, Sol for further help
>
> christoph
>
>
> ======================================
> The Vision Egg mailing list
> Archives: http://www.freelists.org/archives/visionegg
> Website: http://www.visionegg.org/mailinglist.html
--
Christoph Lehmann <lehmann@xxxxxxxxxxxx>
University Hospital of Clinical Psychiatry
======================================
The Vision Egg mailing list
Archives: http://www.freelists.org/archives/visionegg
Website: http://www.visionegg.org/mailinglist.html
Other related posts: