This script will try to read the exchange rates xml file from National Bank of Romania and display the rate for the specified currency.
It exemplifies the usage of urllib2, OptionParser and the minidom module.
Usage: exchangeRate.py --rate|-r USD
Get a specified rate
Options:
--version show program's version number and exit
-h, --help show this help message and exit
-r CURRENCY, --rate=CURRENCY
Retrieve the rate only for specified currency
-l, --list Display a list with all currencies
Grab the archive from here (ver 1.0). Unpack and install with:
python setup.py install