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

Anders Dalvander google at dalvander.com
Thu Oct 30 21:07:40 CET 2003


os.popen[2-4] does not work with parameters inside quotes, nor do
os.popen. At least on Windows.

import os
cmd = '"c:\\command.exe" "parameter inside quotes"'
os.popen4(cmd)

Results in the following error message:

'c:\\command.exe" "parameter inside quotes' is not recognized as an
internal or external command,
operable program or batch file.

// Dalle




More information about the Python-list mailing list