How to execute a linux command by python?
How to execute a linux command by python? for example: execute ls or useradd oracle Who can help me? thank you! -- http://mail.python.org/mailman/listinfo/python-list
Re: How to execute a linux command by python?
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 -- http://mail.python.org/mailman/listinfo/python-list
Re: How to execute a linux command by python?
Fredrik Lundh wrote: start here: http://www.python.org/doc/lib/ make sure you skim though the *entire* list. when you've done that, see the process management section in the os module documentation (make sure to read the entire page before you decide which API to use), and also the subprocess module documentation. /F -- http://mail.python.org/mailman/listinfo/python-list
Re: How to execute a linux command by python?
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/ And continue here: http://www.python.org/doc/lib/os-process.html -- http://mail.python.org/mailman/listinfo/python-list
Re: How to execute a linux command by python?
Daniel Nogradi 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/ And continue here: http://www.python.org/doc/lib/os-process.html You probably should use the subprocess module instead: http://www.python.org/doc/lib/module-subprocess.html I've had much better cross-platform results with that. STeVe -- http://mail.python.org/mailman/listinfo/python-list
Re: How to execute a linux command by python?
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 -- http://mail.python.org/mailman/listinfo/python-list
Re: How to execute a linux command by python?
* [EMAIL PROTECTED] wrote (on 10/18/2006 11:32 AM): 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 BTW, is there a version of pexpect that works with Windows? This package requires pty and termios which isn't supported on Windows. Mark -- http://mail.python.org/mailman/listinfo/python-list