Port parser.py to Python 2.4 :-(