[Pythonmac-SIG] Re: path name issues
Jack Jansen
Jack.Jansen at cwi.nl
Fri Apr 2 15:58:59 EST 2004
On 2 Apr 2004, at 01:44, C Smith wrote:
> Well...here's where I go back to the original post. EasyDialogs gives
> back unix type paths but macpath deals with colons.
>
> [break to learn what is actually getting loaded that lets os.path work
> properly when it is (I thought) loading macpath for me]
>
> OK, I'll spare the reader the discovery that I now realize that I have
> to pay attention to the fact that I am in darwin (something I ignore
> for the most part, pretending that I'm just working on a nice Mac
> system). So I really shouldn't be loading macpath because I'm not in
> "mac mode" when I'm running MacPython 2.3 under OS X. Instead I
> should just load os and use os.path (which will handle everything that
> I was trying to do in macpath.
Aha, now I see the confusion. ntpath/posixpath/macpath have been in
Python since before 1.0, and it has never really been a problem since
people knew they were on nt, posix or a mac. Only now is it starting to
be a problem because people who have a Macintosh have the absolutely
silly idea that they're on a mac:-)
> OK, here's a plea/suggestion:
>
> Could the modules like macpath and macurl2path (and others) that
> really shouldn't be loaded directly (because a master-loader like os
> or urllib is doing the decision of which *path should be loaded) be
> put/buried in a folder like 'lib_support'? This could include other
> files like ntpath, etc..., too.
I don't think this is an option, because lots of software that is out
there that uses those modules directly does so explicitly to do
cross-platform pathname things.
What you could do is check that this isn't mentioned in the
documentation (assuming you haven't read that already:-), and if it
isn't or if you feel it merits better treatment add a sourceforge bug
report to that effect. I'll add a quick note to the FAQ, in the mean
time.
--
Jack Jansen, <Jack.Jansen at cwi.nl>, http://www.cwi.nl/~jack
If I can't dance I don't want to be part of your revolution -- Emma
Goldman
More information about the Pythonmac-SIG
mailing list