On my system (WinXP) typing the following line into command
prompt(cmd.exe) successfully scans the file test1.txt:
"c:\Program Files\Grisoft\A VG Free\avgscan.ex e" "c:\program
files\temp1\tes t1.txt"
Yet the python script:
import os
a = os.popen('"c:\P rogram Files\Grisoft\A VG Free\avgscan.ex e"
"c:\program files\temp1\tes t1.txt"')
print a.read()
Returns a blank line, and I doesn't scan the file. (Note I've used
os.popen() successfully on my system in other situations like:
os.popen('taskk ill /F /IM taskname.exe')) .
I have a feeling my avgscan example shown above not working has
something to do with calling a 3rd party software program (avgscan.exe)
through popen, but I don't know why this won't work, when manually
typing it in the command line does?
prompt(cmd.exe) successfully scans the file test1.txt:
"c:\Program Files\Grisoft\A VG Free\avgscan.ex e" "c:\program
files\temp1\tes t1.txt"
Yet the python script:
import os
a = os.popen('"c:\P rogram Files\Grisoft\A VG Free\avgscan.ex e"
"c:\program files\temp1\tes t1.txt"')
print a.read()
Returns a blank line, and I doesn't scan the file. (Note I've used
os.popen() successfully on my system in other situations like:
os.popen('taskk ill /F /IM taskname.exe')) .
I have a feeling my avgscan example shown above not working has
something to do with calling a 3rd party software program (avgscan.exe)
through popen, but I don't know why this won't work, when manually
typing it in the command line does?
Comment