On Tue, 2013-05-21 at 07:20 -0400, W. Trevor King wrote:
> On Tue, May 21, 2013 at 12:33:28PM +0200, Dmitry Selyutin wrote:
> > Even more, I'd like to avoid some generators and provide this
> > support manually: I've always hated generators, especially code
> > generators (and GUI ones).
> 
> Generators?  Are you referring to 2to3?  I think anyone converting a
> Python project from Python 2 to Python 3 would be cray not to use it.
> They'd also be crazy if they just assumed that it generated optimal
> code ;).  It's best to run it, and then go double check to make sure
> all the changes are meaningful.  Keep stuff like [1]:
> 
>   -                       raise CatalystError, "Could not open file " + 
> filename
>   +                       raise CatalystError("Could not open file " + 
> filename)
> 
> but drop stuff like:
> 
> -               for x in self.values.keys():
> +               for x in list(self.values.keys()):
> 
> Cheers,
> Trevor
> 
> [1]: Although see 305cde6 (Massive pyflakes import cleanup and broken
>      CatalystError calls, 2013-01-19) in dolsen's branch.  There will
>      also be lots of `print ...` → `print(...)` changes, which are
>      needed unless we replaced them with calls to a logging logger
>      [2].
> [2]: http://thread.gmane.org/gmane.linux.gentoo.catalyst/2085/focus=2103
> 

I too was thinking of converting to using loggers. I want it to be
something that is easy to re-direct.  In that way it would be easier for
alternate front-ends to be created.  One such possibility could be a web
front end or other server driven monitoring application.


Reply via email to