Python thinks file is empty

loial jldunn2000 at
Mon Nov 5 16:19:42 CET 2007

I am writing a file in python with writelines

f = open('/home/john/myfile',"w")

But whenever I try to do anything with the file in python it finds  no
data. I am trying ftp, copying the file...the resultant file is always
0 bytes, although if I look at the original file on the unix command
line, its fine


shutil.copyfile('/home/john/myfile', '/home/john/myfile2')

Any ideas what the problem is?

More information about the Python-list mailing list