New submission from Tom Edwards: Consider this script:
f = open("bug>test.txt",'w') f.write("hello") f.close() On Windows the first line will throw an OSError exception because the character '>' is not valid in an NTFS filename. This is correct. Now consider this script: f = open("bug:test.txt",'w') f.write("hello") f.close() This script will complete without error, and f.write will return 5. This despite the colon character also being invalid in NTFS filenames! The output of the second script is an empty file called "bug" in the working directory. I expect it to throw the same exception as the first script. ---------- components: IO messages: 235964 nosy: Artfunkel priority: normal severity: normal status: open title: Incorrect behaviour when opening files containing colons on Windows type: behavior versions: Python 3.4 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue23463> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com