author | robin |
Fri, 10 Jan 2014 17:48:38 +0000 | |
branch | py33 |
changeset 3990 | b484eaf71af9 |
parent 3946 | d7705185366c |
child 4005 | b7dee7fcd927 |
permissions | -rw-r--r-- |
3617 | 1 |
#Copyright ReportLab Europe Ltd. 2000-2012 |
494 | 2 |
#see license.txt for license details |
2332 | 3 |
#history http://www.reportlab.co.uk/cgi-bin/viewcvs.cgi/public/reportlab/trunk/reportlab/__init__.py |
4 |
__version__=''' $Id$ ''' |
|
681 | 5 |
__doc__="""The Reportlab PDF generation library.""" |
3946 | 6 |
Version = "3.0a1" |
2618
19c47ce76a0c
changed version and added warning for old Python users
andy
parents:
2407
diff
changeset
|
7 |
|
19c47ce76a0c
changed version and added warning for old Python users
andy
parents:
2407
diff
changeset
|
8 |
import sys |
19c47ce76a0c
changed version and added warning for old Python users
andy
parents:
2407
diff
changeset
|
9 |
|
3940
39b5e5c82ea1
reportlab/__init__.py: fix allowed version checks & remove cruft
robin
parents:
3820
diff
changeset
|
10 |
if sys.version_info[0:2]!=(2, 7) and sys.version_info<(3, 3): |
39b5e5c82ea1
reportlab/__init__.py: fix allowed version checks & remove cruft
robin
parents:
3820
diff
changeset
|
11 |
raise ImportError("""reportlab requires Python 2.7+ or 3.3+; 3.0-3.2 are not supported.""") |
3820 | 12 |
|
13 |
#define these early in reportlab's life |
|
14 |
isPy3 = sys.version_info[0]==3 |
|
15 |
if isPy3: |
|
16 |
def cmp(a,b): |
|
17 |
return -1 if a<b else (1 if a>b else 0) |
|
18 |
||
19 |
import builtins |
|
20 |
builtins.cmp = cmp |
|
21 |
del cmp, builtins |
|
22 |
else: |
|
23 |
from future_builtins import ascii |
|
24 |
import __builtin__ |
|
25 |
__builtin__.ascii = ascii |
|
3990
b484eaf71af9
reportlab/__init__.py: fix del to delete what we imported (not its alias)
robin
parents:
3946
diff
changeset
|
26 |
del ascii, __builtin__ |