PROPOSAL: Packages in Python lib

Peter A. Koren pkoren at hex.net
Sun May 2 11:15:13 EDT 1999


Hans Nowak wrote:
> 
 I have been trying
> myself to organize all kinds of modules in a package collection, and a
> problem that occurs quite often is, that a module can logically belong in
> more than one package. For instance, modules dealing with HTML parsing, do
> they belong in the Internet package, or in the Text package? (Yes, you don't
> have those packages here... but I do. :^)

Hmmmmm, it sounds like we need some conditional import mechanism. C uses
the preprocessor:

#ifndef themodule
#define themodule
	...
#endif

I am too new to Python to hack the solution, but a conditional import
approach might work.

Regards,

Peter Koren

-- 
Remove the '.zap-this' from the email address to reach me.

"One may proceed from absurd premise to ridiculous conclusion with
impeccable
logic." -- Santayana




More information about the Python-list mailing list