Christian Heimes added the comment:
It might happen when the program hasn't terminated yet. You have to make
sure the program has terminated before you read the file. Subprocess and
its wait() should help.
--
nosy: +tiran
resolution: -> wont fix
status: open -> closed
_
Tim Golden added the comment:
Not, apparently, on my (XP SP2) box:
Python 2.5.1 (r251:54863, Apr 18 2007, 08:51:08) [MSC v.1310 32 bit
(Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> os.system ("""python -c "f=open
('temp.txt','w');f.wr
New submission from Stefan Sonnenberg-Carstens:
When doing such
os.system("a command wich writes a outfile")
f = open("the file the command before wrote")
the file is empty.
If I do this:
os.popen("a command wich writes a outfile")
f = open("the file the command before wrote")
everything is f