On Thu, Jan 20, 2011 at 11:45 AM, Andy Teijelo <ateij...@gmail.com> wrote: .. > but if the code said: > > import café > > then Python would look, in any platform, for a file named: > > café.py or café.py or something nicer. > > Something along the lines of xmlcharrefreplace. > Just an idea.
Curiously, something like this already happens on OSX when filename is not valid UTF-8. For example, >>> open(b'\xdb\xcd', 'w').close() >>> open(b'\xdb\xcd') <_io.TextIOWrapper name=b'\xdb\xcd' mode='r' encoding='UTF-8'> but the actual file created is named "%DB%CD". (Looks like URL-encoding). _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com