On Fri, 1 May 2009 06:55:48 am Thomas Breuel wrote: > You can get the same error on Linux: > > $ python > Python 2.6.2 (release26-maint, Apr 19 2009, 01:56:41) > [GCC 4.3.3] on linux2 > Type "help", "copyright", "credits" or "license" for more > information. > > >>> f=open(chr(255),'w') > > Traceback (most recent call last): > File "<stdin>", line 1, in <module> > IOError: [Errno 22] invalid mode ('w') or filename: '\xff' Works for me under Fedora using ext3 as the file system. $ python2.6 Python 2.6.1 (r261:67515, Dec 24 2008, 00:33:13) [GCC 4.1.2 20070502 (Red Hat 4.1.2-12)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> f=open(chr(255),'w') >>> f.close() >>> import os >>> os.remove(chr(255)) >>> Given that chr(255) is a valid filename on my file system, I would consider it a bug if Python couldn't deal with a file with that name. -- Steven D'Aprano
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4