author | andy |
Thu, 18 May 2006 15:11:23 +0000 | |
changeset 2618 | 19c47ce76a0c |
parent 2407 | 71caad345e58 |
child 2808 | b99a2247e79f |
permissions | -rw-r--r-- |
2332 | 1 |
#Copyright ReportLab Europe Ltd. 2000-2004 |
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.""" |
2618
19c47ce76a0c
changed version and added warning for old Python users
andy
parents:
2407
diff
changeset
|
6 |
Version = "2.0" |
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 |
|
19c47ce76a0c
changed version and added warning for old Python users
andy
parents:
2407
diff
changeset
|
10 |
if sys.version_info[0:2] < (2, 3): |
19c47ce76a0c
changed version and added warning for old Python users
andy
parents:
2407
diff
changeset
|
11 |
warning = """The trunk of reportlab requires Python 2.3 or higher. |
19c47ce76a0c
changed version and added warning for old Python users
andy
parents:
2407
diff
changeset
|
12 |
Any older applications should either use released versions beginning |
19c47ce76a0c
changed version and added warning for old Python users
andy
parents:
2407
diff
changeset
|
13 |
with 1.x (e.g. 1.21), or snapshots or checkouts from our 'version1' |
19c47ce76a0c
changed version and added warning for old Python users
andy
parents:
2407
diff
changeset
|
14 |
branch. |
19c47ce76a0c
changed version and added warning for old Python users
andy
parents:
2407
diff
changeset
|
15 |
""" |
19c47ce76a0c
changed version and added warning for old Python users
andy
parents:
2407
diff
changeset
|
16 |
raise ImportError("reportlab needs Python 2.3 or higher", warning) |
681 | 17 |
|
18 |
def getStory(context): |
|
19 |
if context.target == 'UserGuide': |
|
20 |
# parse some local file |
|
21 |
import os |
|
22 |
myDir = os.path.split(__file__)[0] |
|
23 |
import yaml |
|
24 |
return yaml.parseFile(myDir + os.sep + 'mydocs.yaml') |
|
25 |
else: |
|
26 |
# this signals that it should revert to default processing |
|
27 |
return None |
|
2216 | 28 |
|
29 |
||
30 |
def getMonitor(): |
|
31 |
import reportlab.monitor |
|
32 |
mon = reportlab.monitor.ReportLabToolkitMonitor() |
|
2407 | 33 |
return mon |