PDA

View Full Version : Writing to a file


W.E.T.
04-28-2004, 10:24 AM
Hi,

I now have another problem. I am using these two output files:

f2 = 'Files\Alt.csv'
f3 = 'Files\Errors\Alt_Error.txt'

The first one 'Files\Alt.csv' works fine, but the second one works except for the fact that it calls itself Alt_Error. It has no extension.

Does anyone know why it does not give it a .txt extension???

Notes: if I write the variable 'f3' to screen then it does write the .txt

Thanks

Nick

W.E.T.
04-28-2004, 10:35 AM
Its OK now, I have sorted it :p

I used:


f3 = 'Files\Errors\Alt_Error.txt'
file3 = f3
open (13,file=file3,form='formatted',status='new')

... I have now not used file3 and have just used:


open (13,file=f3,form='formatted',status='new')