[Tutor] Opening a file in Windows Enviroment

Tracy Bost tbost@ifarm.com
Thu, 31 Jan 2002 14:40:41 -0600 (CST)


I'm having a hard time opening a file in windows using the "open" function.
It seems it doesn't like the ":" in the path name.
for example
 filename = 'C:\test.txt'
open(filename,'r+')
 gives me an ugly error everytime :

IOError: [Errno 22] Invalid argument: 'C:\text.txt'


 Please help.
 Thank you

------------------------------------------------------------------------------
Visit "The Most Powerful Tool on the Farm" at http://www.ifarm.com
Get the latest on Ag News, Market Reports, FREE email, and much more.