reportlab/__init__.py
author andy
Thu, 18 May 2006 15:11:23 +0000
changeset 2618 19c47ce76a0c
parent 2407 71caad345e58
child 2808 b99a2247e79f
permissions -rw-r--r--
changed version and added warning for old Python users
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2332
2a7ab4405e18 Remove $Header:, fix CopyRight & history
rgbecker
parents: 2216
diff changeset
     1
#Copyright ReportLab Europe Ltd. 2000-2004
494
54257447cfe9 Changed to indirect copyright
rgbecker
parents: 478
diff changeset
     2
#see license.txt for license details
2332
2a7ab4405e18 Remove $Header:, fix CopyRight & history
rgbecker
parents: 2216
diff changeset
     3
#history http://www.reportlab.co.uk/cgi-bin/viewcvs.cgi/public/reportlab/trunk/reportlab/__init__.py
2a7ab4405e18 Remove $Header:, fix CopyRight & history
rgbecker
parents: 2216
diff changeset
     4
__version__=''' $Id$ '''
681
934a4f24ea5d Added explicit font and encoding support
andy_robinson
parents: 625
diff changeset
     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
934a4f24ea5d Added explicit font and encoding support
andy_robinson
parents: 625
diff changeset
    17
934a4f24ea5d Added explicit font and encoding support
andy_robinson
parents: 625
diff changeset
    18
def getStory(context):
934a4f24ea5d Added explicit font and encoding support
andy_robinson
parents: 625
diff changeset
    19
    if context.target == 'UserGuide':
934a4f24ea5d Added explicit font and encoding support
andy_robinson
parents: 625
diff changeset
    20
        # parse some local file
934a4f24ea5d Added explicit font and encoding support
andy_robinson
parents: 625
diff changeset
    21
        import os
934a4f24ea5d Added explicit font and encoding support
andy_robinson
parents: 625
diff changeset
    22
        myDir = os.path.split(__file__)[0]
934a4f24ea5d Added explicit font and encoding support
andy_robinson
parents: 625
diff changeset
    23
        import yaml
934a4f24ea5d Added explicit font and encoding support
andy_robinson
parents: 625
diff changeset
    24
        return yaml.parseFile(myDir + os.sep + 'mydocs.yaml')
934a4f24ea5d Added explicit font and encoding support
andy_robinson
parents: 625
diff changeset
    25
    else:
934a4f24ea5d Added explicit font and encoding support
andy_robinson
parents: 625
diff changeset
    26
        # this signals that it should revert to default processing
934a4f24ea5d Added explicit font and encoding support
andy_robinson
parents: 625
diff changeset
    27
        return None
2216
aadcd9dc9480 Font reregistration cleanup
andy_robinson
parents: 2203
diff changeset
    28
aadcd9dc9480 Font reregistration cleanup
andy_robinson
parents: 2203
diff changeset
    29
aadcd9dc9480 Font reregistration cleanup
andy_robinson
parents: 2203
diff changeset
    30
def getMonitor():
aadcd9dc9480 Font reregistration cleanup
andy_robinson
parents: 2203
diff changeset
    31
    import reportlab.monitor
aadcd9dc9480 Font reregistration cleanup
andy_robinson
parents: 2203
diff changeset
    32
    mon = reportlab.monitor.ReportLabToolkitMonitor()
2407
71caad345e58 reportlab: release 1.20
rgbecker
parents: 2332
diff changeset
    33
    return mon