2
#Copyright ReportLab Europe Ltd. 2000-2004
3
#see license.txt for license details
4
#history http://www.reportlab.co.uk/cgi-bin/viewcvs.cgi/public/reportlab/trunk/reportlab/lib/units.py
5
__version__=''' $Id$ '''
13
'''convert a string to a length'''
15
if s[-2:]=='cm': return float(s[:-2])*cm
16
if s[-2:]=='in': return float(s[:-2])*inch
17
if s[-2:]=='pt': return float(s[:-2])
18
if s[-1:]=='i': return float(s[:-1])*inch
19
if s[-2:]=='mm': return float(s[:-2])*mm
20
if s[-4:]=='pica': return float(s[:-2])*pica
23
raise ValueError, "Can't convert '%s' to length" % s
b'\\ No newline at end of file'