Distutils: blurring the file==module borders

Frans Englich frans.englich at telia.com
Mon Jan 24 21:42:19 EST 2005


On Tuesday 25 January 2005 02:17, Bill Mill wrote:
> read this thread, it should help you:
>
> http://mail.python.org/pipermail/tutor/2005-January/035124.html

Thanks, it did. Not optimally, but in the way I suspected it would be solved.

In short, the solution, when translated to my case, is to in __init__.py do 
`from ClassA import ClassA`, and hence get the /class/ ClassA in the module's 
namespace. Note, I did not do `from foo.ClassA import ClassA` because that 
failed.

To me, it is kinda hackish; it doesn't show up in the pydocs, and no idea if 
it shadows the actual module(assuming they have identical names, which they 
have) but it appears it can't be solved in a better way.

Another approach would to do copy&paste with the build system at install time, 
but I will not sink that low..


Cheers,

		Frans

 



More information about the Python-list mailing list