os.system issues
Grant Edwards
invalid at invalid
Thu Feb 5 10:16:10 EST 2009
On 2009-02-05, Christian Heimes <lists at cheimes.de> wrote:
> Youri Lammers schrieb:
>> Ok,
>>
>> I want to run a program called 'muscle' with my python script,
>> muscle uses the following command:
>> 'muscle.exe -in filename -out filename'
>> so far I got:
>>
>> import os
>> args = ['-in filename', '-out filename']
>> os.system('E:\Programs\muscle\muscle.exe args')
>>
>> However, when I run this nothing happends, no error message, nothing.
>>
>> So what am I doing wrong here?
>
> For starters you should use the subprocess module instead of os.system.
> Next you have either write "E:\\..." or r"E:\..." (note the trailing 'r').
Leading 'r'.
Or just skip cmd.exe and use forward slashes like god intended.
--
Grant Edwards grante Yow! I'd like MY data-base
at JULIENNED and stir-fried!
visi.com
More information about the Python-list
mailing list