Youri Lammers <youri_lammers...@hotmail.com> writes:
> I want to run a program called 'muscle' with my python script=2C
> 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?

You are calling the program muscle with the argument 'args'.

If you want to put your arguments into the system call, you will
want to write it like this:

os.system('E:\Programs\muscle\muscle.exe -in filename -out filename')

If you need to substitute args into the string passed to
os.system, then take a look at python string handling in the
tutorial.

You also will probably want to look at the 'subprocess' module
at some point, which is more flexible than os.system.

--RDM

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to