Re: File call error message (double backslash)

2005-03-08 Thread John Machin
Fred wrote: > Hi > I am writing on an application, that is supposed to read a file into a > single string: > My program though, when I run it, gives me an error, that the called > file is non existent > 'C:\ \Documents and Settings\ \Fred\ \My Documents\ \School\ \Bio' > Is it normal that python a

Re: File call error message (double backslash)

2005-03-08 Thread M.E.Farmer
Hello Fred, Backslashes are used as an escape and not just in Python ( consider '\r\n' ) To use a backslash you must escape it with two of them like this: \\ 'c:\\windows\\dir' or you can use a raw string: r"c:\windows\dir" or you can use forward slashes. Yes that works ;) "c:/windows/dir" Windows

File call error message (double backslash)

2005-03-08 Thread Fred
Hi I am writing on an application, that is supposed to read a file into a single string: My program though, when I run it, gives me an error, that the called file is non existent 'C:\ \Documents and Settings\ \Fred\ \My Documents\ \School\ \Bio' Is it normal that python adds the space and extra ba