[Pythonmac-SIG] Re: path name issues

C Smith smichr at hotmail.com
Wed Apr 7 16:46:16 EDT 2004


On Friday, Apr 2, 2004, at 14:58 America/Chicago, Jack Jansen wrote:

>> 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.

I'm not suggesting that the files be removed, just that they be moved 
to a sub-folder and then that sub folder is included in the path names 
that are searched when an import statement is encountered. Instead of
Lib/
	...
	macpath
	ntpath
	os
	...
it would be
Lib/
	os
	nt_core/
		ntpath
	mac_core/
		macpath

Some of this is already done by introducing the plat-mac directory, but 
the difference (I imagine) is that the plat-mac contains things that 
will really only work on the mac.
>
> 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.
>
It is like you say--people (like me, at least) who are on a mac think 
that they are really on a mac, even if python thinks it's a posix 
machine. :-)  So the documentation that I would go to first would be 
the macintosh module page.  (Actually, I would most likely load the 
module and ask for help in the IDE to see how to use the 
functions--they aren't that complicated so that has usually been 
sufficient.)   The macpath documentation does say that path operations 
are most portably done using os.path, so if I were to read that I might 
look at the os.path notes...but that module's notes just say that 
"useful path operations" can be done with the functions therein.  In 
the end, I think I would just be confused then as to why there is a 
(seeming) duplication of functionality provided.

Perhaps a note in the FAQ is enough. Unless others are in agreement and 
I received a "second" on the idea of expanding the docs, I may not 
pursue that route further.

Thanks for the feedback,

/c





More information about the Pythonmac-SIG mailing list