Unicode entries on sys.path

"Martin v. Löwis" martin at v.loewis.de
Mon Dec 27 11:38:02 EST 2004


Bengt Richter wrote:
>>The real question here is: why does Python not support arbitrary
>>Unicode strings on sys.path? It could, in principle, atleast on
>>Windows NT+ (and also on OSX). Patches are welcome.
>>
> 
> What about removable drives? And mountable multiple file system types?

I'm not sure I understand the question. What about them?

On Windows, a removable drive will typically have its file names encoded
in UCS-2LE (i.e. "Unicode proper"), through the vfat, ntfs, or joliet
file systems. So if a Unicode file name in sys.path refers to them, and
a proper patch to use wide APIs is incorporated in Python, Python will
transparently find the files on these media.

> Maybe some collections of potentially homogenous file system references
> such as sys.path need to be virtualized to carry relevant file system
> encoding and protocol info etc.

No no no. sys.path contains path names on the local system, nothing
virtualized (unless one of the existing hook mechanisms is used, which
would be OT for this thread).

Regards,
Martin



More information about the Python-list mailing list