User Tools

Site Tools


python:bnrxml

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

python:bnrxml [2013/03/16 17:41]
python:bnrxml [2013/03/16 17:41] (current)
Line 1: Line 1:
 +==== 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.
 +
 +<​code>​
 +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
 +</​code>​
 +
 +
 +Grab the archive from {{:​python:​exchangerate-1.0.tar.gz|here (ver 1.0)}}. Unpack and install with:
 +
 +<​code>​
 +python setup.py install
 +</​code>​
 +
  
python/bnrxml.txt ยท Last modified: 2013/03/16 17:41 (external edit)