Problem Writing Files

Roger Jones rmj at slac.stanford.edu
Tue Apr 16 22:39:56 EDT 2002


I am using ActiveState Python 2.1 under Windows NT  and after opening a
file with:

afile=('test.dat','w')
afile.write('some random test text')
afile.read()

It fills the file with many x's and 0's and also with various other
text.
How can this action be fixed so that it writes the text properly?

Thanks!

-Roger Jones




More information about the Python-list mailing list