New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
csv #71543
Comments
Hi, I am running Canopy on Windows 7 64 bit. ----> 5 with open('C:\Users\Anwender\Desktop\Test\blub.txt') as csvfile: IOError: [Errno 22] invalid mode ('r') or filename: 'C:\\Users\\Anwender\\Desktop\\Test\x08lub.txt' As you see, Python complains about the file name after it changes the file name for no reason. The thing is, when I use a capital letter after every back slash it is fine, but I needed quite some time to figure that out. So it is very annoying for everyone encountering the problem for the first time. Thank you for developing Python! |
Thanks for the report. \t is a tab character. You can use
or
or
|
(Berker beat me to it, but posting anyway since it is more detailed) Backslashes are escape characters, and "\b" is treated as "\x08". Invalid combinations (e.g. "\A", "\D"...) automatically escape the backslash, but you shouldn't rely on this behaviour - as you can see, it can break in various ways. To fix your issue, you can either:
|
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: