File names with slashes [was Re: error in os.chdir]
mikhailwas at gmail.com
Wed Jul 4 16:25:23 EDT 2018
Joe Pfeiffer wrote:
>> On Windows a path is e.g.:
>> So what is reasonable about using forward slashes?
>> It happens to me that I need to copy-paste real paths like 100 times
>> a day into scripts - do you propose to convert to forward slashes each time?
> That's what started the thread -- using backslashes caused a \a to be
> interpreted as a special character instead of two characters in the
Yes, and the answer was a week ago: just put "r" before the string.
And it worked till now. So why should I replace backslashes with
There is one issue that I can't write \ on the end:
But since I know it's a path and not a file, I just write without trailing \.
More information about the Python-list