User Tools

Site Tools


XML Reader script for BNR exchange rates file

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: --rate|-r USD

Get a specified rate

  --version             show program's version number and exit
  -h, --help            show this help message and exit
                        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 install

python/bnrxml.txt · Last modified: 2013/03/16 17:41 (external edit)