File: __init__.py

package info (click to toggle)
python-reportlab 2.0dfsg-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 9,140 kB
  • ctags: 6,455
  • sloc: python: 58,703; xml: 1,494; makefile: 88
file content (33 lines) | stat: -rw-r--r-- 1,126 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#Copyright ReportLab Europe Ltd. 2000-2004
#see license.txt for license details
#history http://www.reportlab.co.uk/cgi-bin/viewcvs.cgi/public/reportlab/trunk/reportlab/__init__.py
__version__=''' $Id: __init__.py 2877 2006-05-18 15:11:23Z andy $ '''
__doc__="""The Reportlab PDF generation library."""
Version = "2.0"

import sys

if sys.version_info[0:2] < (2, 3):
    warning = """The trunk of reportlab requires Python 2.3 or higher.
    Any older applications should either use released versions beginning
    with 1.x (e.g. 1.21), or snapshots or checkouts from our 'version1'
    branch.
    """
    raise ImportError("reportlab needs Python 2.3 or higher", warning)

def getStory(context):
    if context.target == 'UserGuide':
        # parse some local file
        import os
        myDir = os.path.split(__file__)[0]
        import yaml
        return yaml.parseFile(myDir + os.sep + 'mydocs.yaml')
    else:
        # this signals that it should revert to default processing
        return None


def getMonitor():
    import reportlab.monitor
    mon = reportlab.monitor.ReportLabToolkitMonitor()
    return mon