Re: Regular Text

2007-06-11 Thread Peter Otten
[EMAIL PROTECTED] wrote: > Wow, that is fast. Thanks. > >> In your code, you should use string literals like >> >> my_path = r"C:\Programs\Python\new" >> my_path = "C:\\Programs\\Python\\new" >> >> But you said "a program to retrieve the filepath" - and I understand that >> you dont have a strin

Re: Regular Text

2007-06-11 Thread jaeltong
Wow, that is fast. Thanks. > In your code, you should use string literals like > > my_path = r"C:\Programs\Python\new" > my_path = "C:\\Programs\\Python\\new" > > But you said "a program to retrieve the filepath" - and I understand that > you dont have a string literal, and you compute it somehow.

Re: Regular Text

2007-06-11 Thread Gabriel Genellina
\new\. > Because of the regular text format, I didn't get what I want in the > text file. > > I tried to change the separator from \ to / but python only gives C:/ > Programs/Python\new/. > > How should I do to make sure that the program writes the correct path > i

Regular Text

2007-06-11 Thread jaeltong
Hallo, I am new to python. I wrote a program to retrieve the filepath. eg. C:\Programs\Python\ and write it in a text file It works fine until the path contains \t or \n. eg. C:\Programs\Python \new\. Because of the regular text format, I didn't get what I want in the text file. I tried to c