[Python-Dev] Adding the 'path' module (was Re: Some RFE for review)
M.-A. Lemburg
mal at egenix.com
Sat Jul 9 19:43:54 CEST 2005
Neil Hodgson wrote:
> M.-A. Lemburg:
>
>
>>I don't really buy this "trick": what if you happen to have
>>a home directory with Unicode characters in it ?
>
>
> Most people choose account names and thus home directory names that
> are compatible with their preferred locale settings: German users are
> unlikely to choose an account name that uses Japanese characters.
It's naive to assume that all people in Germany using the German
locale have German names ;-) E.g. we have a large Japanese community
living here in Düsseldorf. If that example does not convince you,
just have a look at all the Chinese restaurants in cities around
the world - I'm sure that quite a few of the owners will want to
use their correctly written name as account name. Unicode makes
this possible and while it may not be in wide-spread use nowadays,
things will definitely change over the next few years as more and
more OSes and platforms will introduce native Unicode support.
> Unicode is only necessary for file names that are outside your default
> locale. An administration utility may need to visit multiple user's
> home directories and so is more likely to encounter files with names
> that can not be represented in its default locale.
I'm not sure why you bring up an administration tool: isn't
the discussion about being able to load Python modules from
directories with Unicode path components ?
> I think it would be better if sys.path could include unicode
> entries but expect the code will rarely be exercised.
I think that sys.path should always use Unicode for non-ASCII
path names - this would make it locale setting independent, which
is what we should strive for in Py3k: locales are much easier to
handle at the application level and only introduce portability
problems if used at the OS or C lib level.
--
Marc-Andre Lemburg
eGenix.com
Professional Python Software directly from the Source
>>> Python/Zope Consulting and Support ... http://www.egenix.com/
>>> mxODBC.Zope.Database.Adapter ... http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ... http://python.egenix.com/
________________________________________________________________________
::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! ::::
More information about the Python-Dev
mailing list