C
ChrisH
Is there a way in python to run a DOS command and have it return any errors that occur? I've
tried some of the different versions of peopen as well as the code listed below and none of
them give me the error that is displayed when I run the command from a prompt.
(Python 2.3, win32all, Windows NT/2K/XP)
strExec = 'copy "z:\MS Exchange Settings.NK2" "%USERPROFILE%\Application Data\Microsoft
\Outlook\"'
outdata=''
proc = os.popen(strExec)
while 1:
line = proc.readline()
if line:
print line
outdata=outdata+line
else:
break
Thanks for the help,
Chris
tried some of the different versions of peopen as well as the code listed below and none of
them give me the error that is displayed when I run the command from a prompt.
(Python 2.3, win32all, Windows NT/2K/XP)
strExec = 'copy "z:\MS Exchange Settings.NK2" "%USERPROFILE%\Application Data\Microsoft
\Outlook\"'
outdata=''
proc = os.popen(strExec)
while 1:
line = proc.readline()
if line:
print line
outdata=outdata+line
else:
break
Thanks for the help,
Chris