Development testing without reinstalling egg constantly?

Grant Edwards grant.b.edwards at gmail.com
Thu Jun 29 11:32:21 EDT 2017


On 2017-06-29, Peter Otten <__peter__ at web.de> wrote:
> Grant Edwards wrote:
>
>> The projects 'main.py' can't be run directly from the command line,
>> since it contains code like this:
>> 
>>    from . import config
>>    from . import __version__
>>    __name__ = 'muttdown'
>>    
>>    [ stuff that does real work ]
>
> Stupid question: isn't the following
>
>>    
>>    if __name__ == '__main__':
>>        main()
>
> dead code then?

At appears so.

> Actually, two stupid questions: what is
>
>>    __name__ = 'muttdown'
>
> supposed to achieve in the first place?

I don't know.

This is somebody else's project I'm hacking on, and my understanding
of setup tools is pretty much at the "cargo cult" level.

-- 
Grant Edwards               grant.b.edwards        Yow! FUN is never having to
                                  at               say you're SUSHI!!
                              gmail.com            




More information about the Python-list mailing list