How to execute a linux command by python?

venkatbo at yahoo.com venkatbo at yahoo.com
Wed Oct 18 14:32:05 EDT 2006


Fredrik Lundh wrote:
> haishan chang wrote:
>
> > How to execute a linux command by python?
> > for example: execute "ls"  or "useradd oracle"
> > Who can help me?
>
> start here:
>
>      http://www.python.org/doc/lib/
>
> </F>

After reading the matl. pointed to by the many links listed here,
you can try pexpect. Provided for more control and interactivity.
More at: http://pexpect.sourceforge.net/

/venkat




More information about the Python-list mailing list