Package __init__ question

David LeBlanc whisper at oz.net
Thu May 23 14:34:08 EDT 2002


I downloaded a package - let's call it "fumble" - and when I installed it,
it put itself into site-packages directly and not a sub-directory of it.
Since I want to keep the site-packages directory clean, I created a
subdirectory called fumble and copied all the fumble files into it. I added
an empty __init__.py file and it didn't work. Only after I added the line
"from fumble import *" to the __init__ file did it work.

Is this the correct way that packages are meant to work? I kind of doubt it,
but looking over the pythondoc failed to suggest any alternative (my
solution was a lucky guess). Comments and pointers to good doc appreciated.

TIA

David LeBlanc
Seattle, WA USA






More information about the Python-list mailing list