"Varsha Purohit" <[EMAIL PROTECTED]> wrote

>      I have an application where i need to run a python script from
> wxpython gui. I am calling the script from the button click event. 
> And
> the moment button is pressed the python script should be executed.

This comes up from time to time and is usually a bad idea.
Is there a reason why you cannot import the script as a module and
then call a function (or functions) within the script instead of 
executing
the script? That is a much safer and more flexible process.

However, if that is impossible you can use subprocess module
to execute any external program including python, so simply call
that fom your event handler.

If you are having difficulties post some sample code and we
can give more specific help.

HTH,


-- 
Alan Gauld
Author of the Learn to Program web site
http://www.freenetpages.co.uk/hp/alan.gauld 


_______________________________________________
Tutor maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/tutor

Reply via email to