command.getoutput()

Klaus Alexander Seistrup spam at magnetic-ink.dk
Thu Feb 27 02:24:54 EST 2003


Peter Wu wrote:

>>>> import commands
>>>> commands.getoutput('ver')
> "'{' is not recognized as an internal or external command,\noperable program or batch file."
> 
> What's the problem here? Thanks.

The problem is probably that you're running Windows.

>From commands.py (see "help(commands)"):

	pipe = os.popen('{' + cmd + '; } 2>&1', 'r')

Does this make sense under Windows?


  // Klaus
  - who is Windows illiterate
-- 
 ><> 	vandag, môre, altyd saam




More information about the Python-list mailing list