library to launch program in linux
Laszlo Nagy
gandalf at shopzeus.com
Thu Sep 6 15:31:43 EDT 2007
Grant Edwards wrote:
> On 2007-09-06, idzwan.nizam at gmail.com <idzwan.nizam at gmail.com> wrote:
>
>
>> I'm a new user. What library should I use so that I can launch
>> program in linux using python? Thank you in advance.
>>
>
> subprocess
>
Hmm, there are some others. Here is a list:
os.system
os.popen (and os.popen2, os.popen3)
os.spawn
popen2 (the module)
subprocess (this is often preferred over other modules)
If you need to communicate with a subprocess using the system console,
then possibly the third party pexpect module worth look at it.
If you need to use this on Windows then you can use the win32 extensions
and "CreateProcess"...
I suggest that you read their documentation. Some of them are easy to
use but feature less. Others are good for some purpose.
Laszlo
p.s.: In Python "there should be only one obvious and correct way to do
it". What??? :-)
More information about the Python-list
mailing list