So true... I often need to write something that will run on a Windows machine and I just end up having to use the old version of Beautiful Soup (before it became dependent on lxml). Pretty frustrating.
Python for Humans
11–20 of 74 posts
Re: Python for Humans
#12Re: Python for Humans
#13Re: Python for Humans
#14Slightly off topic: in an effort to become a better programmer, and to improve the Python ecosystem, I've tried to write a "for Humans" style logging library. Would anyone mind giving me feedback? http://peterdowns.com/lggr/
Looks great. Can't get to testing it today but I will get back to you soon.
Re: Python for Humans
#15https://github.com/kennethreitz/requests/issues/394
That's why I am still using urllib2.
Re: Python for Humans
#16Slightly off topic: in an effort to become a better programmer, and to improve the Python ecosystem, I've tried to write a "for Humans" style logging library. Would anyone mind giving me feedback? http://peterdowns.com/lggr/
- Why is your example logger named d? It might seem nitpicky but it's hard
to read an example with a meaningless single character variable.
- "d.close() # stop logging" - what is this? What does it mean to "stop
logging" and why do I want to?
- "Add a coroutine" - I would wager the lay Python developer doesn't even
know what this word means.
- lggr.Lggr() - Why not just name the class Logger?
- The default format variables are inconsistent about when words are
separated with an underscore.
- I can't make sense of the example logging calls. In one you pass a
dictionary as the second argument, in another you pass three strings as
separate arguments. Why would anyone pass a message like this instead of
just using standard string formatting? Especially when there's other
legit arguments like extra. It's not even really clear why you'd want to
pass something in extra instead of in the message.
I fully support your goal, but at a glance this seems like a confusing alternative
to logging.EDIT: hot dang it's hard to format a bulleted list on HN
Re: Python for Humans
#17Earlier quoted context omitted.
Yep. I was looking for exactly this list. Incidentally Python could use an more equivalent to djangopackages.com to help in identifying popular alternatives to standard lib packages.
While not a table of "stdlib package => 3rd party package", there is this: http://docs.python-guide.org/en/latest [ Also by Kenneth Reitz ]
Re: Python for Humans
#18Re: Python for Humans
#19I was at his talk this morning at pycon canada. It was a very good talk, the highlight of the conference. I like his approach, although I think it'll be a challenge to get there since not everyone has his "visionary" and api building skills, but someone has to start somewhere. Well done.
Re: Python for Humans
#20requests & envoy have saved me a huge amount of hours. I wish I met Kenneth when he was in Toronto this weekend, I would have bought him anything he wanted.