karlcow/ymir — Issue #1: A few suggestions
Author: davidbgk
Created: 2012-01-10 13:07:04+00:00
State: open

(too lazy to open many issues)

If you use Python 2.7, argparse is recommended http://docs.python.org/library/argparse.html#module-argparse
If you encoding is utf-8, do not forget to specify u"your strings" with a u prefix ('©' can be problematic)
If you plan to add some logging instead of print statements, logbook is interesting http://packages.python.org/Logbook/
If you use pip/virtualenv for dependencies (and if not you should ;), generate the associated requirements.txt file

I don't know about etree, but generally using the following pattern in Python is not really pythonic:

if len(myvar) compared to 0 or 1:

most of the time it will be equivalent to:

if (not) myvar:

がんばって!