command.getoutput()

Simon Brunning SBrunning at trisystems.co.uk
Thu Feb 27 08:26:26 EST 2003


> From:	Peter Wu [SMTP:peterwu at hotmail.com]
> Python 2.2.2 (#37, Oct 14 2002, 17:02:34) [MSC 32 bit (Intel)] on win32
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import commands
> >>> commands.getoutput('ver')
> "'{' is not recognized as an internal or external command,\noperable
> program or batch file."
 
The commands module is documented as only working on Unix -
<http://www.python.org/doc/current/lib/module-commands.html>. Try os.popen
and siblings.

Cheers,
Simon Brunning
TriSystems Ltd.
sbrunning at trisystems.co.uk




-----------------------------------------------------------------------
The information in this email is confidential and may be legally privileged.
It is intended solely for the addressee. Access to this email by anyone else
is unauthorised. If you are not the intended recipient, any disclosure,
copying, distribution, or any action taken or omitted to be taken in
reliance on it, is prohibited and may be unlawful. TriSystems Ltd. cannot
accept liability for statements made which are clearly the senders own.





More information about the Python-list mailing list