distutils (packaging) newbie questions please....

Ian Bicking ianb at colorstudy.com
Tue Sep 30 22:45:39 EDT 2003


On Tuesday, September 30, 2003, at 06:57 PM, Greg Krohn wrote:
>> 1. What exactly goes into the __init__.py files? I know what to put in
>> setup.py
>>     and I know __init__.py is used for packages but I don't know what
>> to put IN this file.
>
> You don't NEED to put anything in it, it works fine as an empty file. 
> You
> CAN put code in there to initialize your package, but personally I've 
> never
> had to.

As a minor detail, it is better to put something in there (like just a 
single #).  Some tools (WinZip in particular, I believe) ignore 
zero-length files in archives, which will cause problems in this case.

   Ian






More information about the Python-list mailing list