~ubuntu-branches/ubuntu/vivid/python-reportlab/vivid-proposed

« back to all changes in this revision

Viewing changes to src/reportlab/lib/units.py

  • Committer: Package Import Robot
  • Author(s): Matthias Klose
  • Date: 2014-01-12 02:16:21 UTC
  • mfrom: (1.2.9) (4.1.9 sid)
  • Revision ID: package-import@ubuntu.com-20140112021621-f4mpp5qaj1dkq2yb
Tags: 2.8~20140112-1
* New upstream snapshot.
* Build python3 packages.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
#Copyright ReportLab Europe Ltd. 2000-2012
3
3
#see license.txt for license details
4
4
#history http://www.reportlab.co.uk/cgi-bin/viewcvs.cgi/public/reportlab/trunk/reportlab/lib/units.py
5
 
__version__=''' $Id: units.py 3959 2012-09-27 14:39:39Z robin $ '''
 
5
__version__=''' $Id$ '''
6
6
__doc__='''Defines inch, cm, mm etc as multiples of a point
7
7
 
8
8
You can now in user-friendly units by doing::
27
27
        if s[-4:]=='pica': return float(s[:-4])*pica
28
28
        return float(s)
29
29
    except:
30
 
        raise ValueError, "Can't convert '%s' to length" % s
 
30
        raise ValueError("Can't convert '%s' to length" % s)