osdir.com


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to execute shell command in Python program?


Thanks for your suggestions.

I have sorted the issue as follows:

import pexpect
child = pexpect.spawn('./opac')
child.sendline('opac')

This works!!!