On Fri, Sep 02, 2005 at 01:45:42PM -0700, alexLIGO wrote:
> Can I force python to execute the program on the bash? What can
> I do?

os.system() is a wrapper on system(3), which invokes /bin/sh.

If you want to use a different shell, you can use
    os.spawnv(os.P_WAIT, '/bin/bash', ['bash', '-c', command])
or even avoid the use of a shell altogether:
    os.spawnvp(os.P_WAIT, 'myprogram', ['myprogram', '-arg1', 'arg2'])

Jeff

Attachment: pgpCg9wAYQyA8.pgp
Description: PGP signature

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

Reply via email to