Great example of a python module/package following up to date conventions.
I'm hoping someone on here can point me to an example of a python package that is a great example of how to put it all together. I'm hoping for example code that demonstrates: -Strict adherence to PEP 8 -thorough use of Docstrings -Conventional directory structure/package layout -Appropriate use of the latest accepted coding guidelines in the python community (e.g., new classes versus old classes, Python 3000 compatibility, newer language features, etc. etc.) -Some amount of object oriented design Bonus: -Unit tests -Logging mechanism I can't imagine a package that's been around longer than a few years will hit upon all these things well unless the maintainer went back and did some serious refactoring and re-tooling. Is this question possible to answer? -- http://mail.python.org/mailman/listinfo/python-list
Re: Great example of a python module/package following up to date conventions.
On Jan 28, 2:28 pm, Josh Holland wrote: > On 2010-01-28, Big Stu wrote: > > > I'm hoping someone on here can point me to an example of a python > > package that is a great example of how to put it all together. I'm > > hoping for example code that demonstrates: > > Surely most of the Standard Library should satisfy all your > requirements? > > -- > Josh "dutchie" Holland > http://www.joshh.co.uk/http://twitter.com/jshhollandhttp://identi.ca/jshholland That's definitely a place I've started to poke around, but the standard library stuff always comes to me by way of my standard python installation. I was hoping to have a template of a 3rd party package to follow. Complete with conventions to follow for easily packaging and distributing via the usual python channels (pypi, easy_install, egg, etc.). -- http://mail.python.org/mailman/listinfo/python-list
Re: Great example of a python module/package following up to date conventions.
> Have you actually looked at any of the standard library? > > Jean-Paul I'm looking at urllib2 right now and it is covering a bunch of the bases I'm looking for. And grepping in the /usr/lib/python2.5/ folder for import statements on various things I'm interested in is bringing up some good examples to check out as well. Given that I'm still fairly novice to this I'm not yet in the position to make a good judgment on what is and isn't a good python practice so I was hoping someone on here might be able to point at a module or 2 that has really done a good job of following best practices. Seems like a reasonable question with an answer that others in a similar position to me might find useful. -- http://mail.python.org/mailman/listinfo/python-list