[Tutor] [wxPython-users] Executing a python script in WxPython

Kent Johnson kent37 at tds.net
Wed Nov 14 04:34:38 CET 2007


Varsha Purohit wrote:
> Hello,
>       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.

If you can import the script and call the required function that is the 
simplest approach. If you have to run the script as from the command 
line then use os.system or subprocess.Popen.

Kent
> 
> thanks,
> Varsha Purohit,
> Graduate Student
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> http://mail.python.org/mailman/listinfo/tutor
> 



More information about the Tutor mailing list