os.popen() not executing command on windows xp

Justin Ezequiel justin.mailinglists at gmail.com
Thu Jan 11 10:59:20 CET 2007


> import os
> a = os.popen('"c:\Program Files\Grisoft\AVG Free\avgscan.exe"
> "c:\program files\temp1\test1.txt"')
> print a.read()
>

use raw strings

e.g., instead of '"c:...\avgscan...'
use r'"c:...\avgscan...'

http://www.ferg.org/projects/python_gotchas.html#contents_item_2




More information about the Python-list mailing list