Re: obviscating python code for distribution

2011-05-20 Thread Disc Magnet
On Mon, May 16, 2011 at 9:06 AM, Littlefield, Tyler ty...@tysdomain.com wrote: I'm putting lots of work into this. I would rather not have some script kiddy dig through it, yank out chunks and do whatever he wants. I just want to distribute the program as-is, not distribute it and leave it open

When is PEP necessary?

2011-04-23 Thread Disc Magnet
Is PEP necessary to add a new package to the standard library? What if the community just wants to add a new module to an existing package? What if only a new function has to be added to a module in the standard library? What if only a line or two are to be added to a function in the standard

logger warning doesn't appear even though propagate flag is True

2011-04-18 Thread Disc Magnet
This program prints both the warnings: #!/usr/bin/env python2.7 import logging import logging.config logging.config.fileConfig('log.conf') log1 = logging.getLogger() log2 = logging.getLogger('foo.bar') log2.addHandler(logging.NullHandler()) log1.warn('warning 1') log2.warn('warning 2')

Two similar logging programs but different ouputs

2011-04-18 Thread Disc Magnet
I have tried writing two programs which are doing similar activities. The little difference between the two programs is that the first one configures logger1 using addHandler() method while the second program configures logger1 from log.conf file. However, the output differs for both. The first

Re: Two similar logging programs but different ouputs

2011-04-18 Thread Disc Magnet
Thank you Vinay for the quick reply. I have a few more questions. On Tue, Apr 19, 2011 at 3:27 AM, Vinay Sajip vinay_sa...@yahoo.co.uk wrote: On Apr 18, 10:11 pm, Disc Magnet discmag...@gmail.com wrote: Could you please help me understand this difference? Programs and log.conf file follow