I've been playing with Python for a while, which I love and would like to target professionally, and am lucky enough to take a work break to train myself and hope to land a Python job. I read a few books (Clean Code, Dive Into Python 2+3) and the last two days I built https://github.com/ronjouch/whoarder
Being on my own I'm probably doing some things horribly wrong, so I'd like some feedback from experienced people. Anything will do! Advice on unit tests, general coding practices, python-specific features I use well or misuse, advice on books, tools, etc. I have a few questions, too:
1. test.py: I used unittest to get used to standard stuff. What would I gain by using nose? Do you always use it, or is unittest fine for small projects?
2. whoarder.py: The if block in is ugly but is the only workaround I found for relative imports in py3. Could I restructure my app to avoid the issue?
3.1. My app could fit in a single .py, but I made a module anyway, because I'm happy to drink the "It will help you structure and better SRP your code" kool-aid. Right?
3.2. ... but I put several classes in a single .py because I felt it worthwhile to bring them closer. Is that ok or frowned upon?
4. clippings.py:ClippingsIterator: I abstracted input parsing through a custom iterator, while I could just have split by separator. That way I don't read all upfront and can interrupt if something goes wrong. Good or overkill?
5. clippings.py:detect_encoding: any idea why chardet2 doesn't tell me about the BOM?
6. template.html/web: anything worth mentioning; I'm very much doing things 'by hand', maybe the wrong way and would appreciate general feedback.
Thanks for your help.