[Tutor] write to a file

alan.gauld@bt.com alan.gauld@bt.com
Wed, 21 Aug 2002 17:35:49 +0100


>     os.open("C:\blah.txt", 'w')

> 	I don't see what an integer has to do with anything? 

You've had that explained in depth. But there's another 
problem.

Using the '\' character in filenames is not a good thing. 
Better to use a '/' slash which works just as well but 
is safer. 

"C:/blah.txt"

If you really must use a '\' use two:

"C:\\blah.txt"

It makes for a saner life!

Alan g.