(original) (raw)
Hello,
I wish to do an iteration that will write something on each new line in a
text file. Something like this:
sFile = 'C:\\\\myFile.txt'
oFile = file( sFile, 'rw' )
for oLine in range(1,10):
oFile.write( 'text' )
However when I run this I get an IO error for the oFile.write() line.
Any suggestion?
Thanks
Bernard
I wish to do an iteration that will write something on each new line in a
text file. Something like this:
sFile = 'C:\\\\myFile.txt'
oFile = file( sFile, 'rw' )
for oLine in range(1,10):
oFile.write( 'text' )
However when I run this I get an IO error for the oFile.write() line.
Any suggestion?
Thanks
Bernard