[Tutor] os.startfile?

Alan Gauld alan.gauld at btinternet.com
Fri Jun 25 02:08:56 CEST 2010


"Jim Byrnes" <jf_byrnes at comcast.net> wrote

> The os.startfile('socket-nongui.py) line was in a gui program that 
> demonstrates how to start and communicate with a non-gui program. 
> It is Windows specific so I looked for but could not find a drop  in 
> replacement that works on Linux.

Look at the subprocess module. That is the platform independant way
to run external programs and communicate with them. There are lots of
examples in the documentation and you can find some basic info in
the OS topic of my tutorial (Python v2 only so far for that one)


-- 
Alan Gauld
Author of the Learn to Program web site
http://www.alan-g.me.uk/




More information about the Tutor mailing list