Madhavan Bomidi wrote:
> import subprocess
> subprocess.call(['./opac'],shell=True)

subprocess.call(['./opac', "my-input.inp"], shell=True)

The array takes command with a list of arguments. This
way you don't need to do space escaping and other
Jujitsu gimmicks.

If you want to feed the command from stdin, this becomes a bit
more complicated as you need to start a subprocess and use
PIPE to feed it.

Cheers,
Chris Narkiewicz

Attachment: signature.asc
Description: OpenPGP digital signature

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

Reply via email to