boa constructor - run script/output
Tom
llafba at gmx.net
Thu Jun 26 15:31:30 EDT 2003
Thanks for your answer.
1.) yes, I had to put my whole script into a function. Didn't know that
first. I wanted to run the whole script, but I think it works now.
2.) I also think that the examples of wxPython are really great.
Sometimes it is just hard to understand the code if you are a newbie.
:-) I worked on this all day and think that I did it now!:-)
Thanks for your help.
Tom
delphiro wrote:
>problem 1)
>
>It sounds like you need to import your script
>
>import your_script_name
>
>and attach an event to the function that you want to call
>from within your script
>
>for example;
>
>yourscript.py contains function 'DoThis()'
>
>in gui class:
>
>import yourscript.py
>
>some event
>
>def OnButtonMyButtonDown(self,event):
> yourscript.DoThis()
>
>2)
>
>You will have to edit your script in a way that it
>knows where to send it's output. This means you will
>have to pass a widget (like wxTextCtrl) to your script
>and output the messages to that widget.
>
>The best way to actualy learn wxPython for me was to study the
>examples. They realy make things clear for almost any widget!
>
>Hope this helps,
>Rob
>
>
>
More information about the Python-list
mailing list