popen[2-4] does not work with parameters inside quotes

Anders Dalvander google at dalvander.com
Fri Oct 31 08:29:28 EST 2003


"Emile van Sebille" <emile at fenx.com> wrote in message news:<bnrte4$14vkmn$1 at ID-11957.news.uni-berlin.de>...
> Hmm... not for me... I get:
> 
> >>> import os
> >>> cmd = '"c:\\command.exe" "parameter inside quotes"'
> >>> os.popen4(cmd)
> (<open file '"c:\command.exe" "parameter inside quotes"', mode 'w' at
> 0x008E6620>, <open file '"c:\command.exe" "parameter insid
> e quotes"', mode 'r' at 0x008EC060>)
> 

Did you try with having the exe-file in another directory with spaces:
"c:\path with spaces\command.exe"?

What Windows version are you running?

// Dalle




More information about the Python-list mailing list