How to execute shell command in Python program?

Madhavan Bomidi blmadhavan at gmail.com
Tue Jul 23 10:22:14 EDT 2019


Thanks for your suggestions.

I have sorted the issue as follows:

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

This works!!!



More information about the Python-list mailing list