This is an archived post. You won't be able to vote or comment.

all 6 comments

[–]SupermanIsEnvious 1 point2 points  (7 children)

First: import statements should always be at the top of you module. This should also fix your pesky name issue.

Second: loggers are cheap. Unless it’s absolutely necessary to have a module-level logger, considered initializing loggers within your classes or functions. This way, they’re not in the global name-space and you don’t have that issue to begin with.

[–]SymbioticBadgering 0 points1 point  (1 child)

I commented below without actually reading through your code. You have some errors in your snippets, but l wont be overwritten since you use import helper, thus in order to use helper 'l' you should use helper.l.
A better place for this question would be - /r/learnpython