eliminate from . imports in favour of absolutes to allow running modules
--- a/src/reportlab/graphics/barcode/__init__.py Thu Jan 09 12:54:10 2014 +0000
+++ b/src/reportlab/graphics/barcode/__init__.py Thu Jan 09 13:53:18 2014 +0000
@@ -36,14 +36,14 @@
def getCodes():
"""Returns a dict mapping code names to widgets"""
- from .widgets import BarcodeI2of5, BarcodeCode128, BarcodeStandard93,\
+ from reportlab.graphics.barcode.widgets import BarcodeI2of5, BarcodeCode128, BarcodeStandard93,\
BarcodeExtended93, BarcodeStandard39, BarcodeExtended39,\
BarcodeMSI, BarcodeCodabar, BarcodeCode11, BarcodeFIM,\
BarcodePOSTNET, BarcodeUSPS_4State
#newer codes will typically get their own module
- from .eanbc import Ean13BarcodeWidget, Ean8BarcodeWidget, UPCA
- from .qr import QrCodeWidget
+ from reportlab.graphics.barcode.eanbc import Ean13BarcodeWidget, Ean8BarcodeWidget, UPCA
+ from reportlab.graphics.barcode.qr import QrCodeWidget
#the module exports a dictionary of names to widgets, to make it easy for
--- a/src/reportlab/graphics/barcode/code128.py Thu Jan 09 12:54:10 2014 +0000
+++ b/src/reportlab/graphics/barcode/code128.py Thu Jan 09 13:53:18 2014 +0000
@@ -31,7 +31,7 @@
#
from reportlab.lib.units import inch
-from .common import MultiWidthBarcode
+from reportlab.graphics.barcode.common import MultiWidthBarcode
from string import digits
_patterns = {
--- a/src/reportlab/graphics/barcode/code39.py Thu Jan 09 12:54:10 2014 +0000
+++ b/src/reportlab/graphics/barcode/code39.py Thu Jan 09 13:53:18 2014 +0000
@@ -31,7 +31,7 @@
#
from reportlab.lib.units import inch
-from .common import Barcode
+from reportlab.graphics.barcode.common import Barcode
from string import digits as string_digits
_patterns = {
--- a/src/reportlab/graphics/barcode/code93.py Thu Jan 09 12:54:10 2014 +0000
+++ b/src/reportlab/graphics/barcode/code93.py Thu Jan 09 13:53:18 2014 +0000
@@ -31,7 +31,7 @@
#
from reportlab.lib.units import inch
-from .common import MultiWidthBarcode
+from reportlab.graphics.barcode.common import MultiWidthBarcode
_patterns = {
'0' : ('AcAaAb', 0), '1' : ('AaAbAc', 1), '2' : ('AaAcAb', 2),
--- a/src/reportlab/graphics/barcode/fourstate.py Thu Jan 09 12:54:10 2014 +0000
+++ b/src/reportlab/graphics/barcode/fourstate.py Thu Jan 09 13:53:18 2014 +0000
@@ -31,7 +31,7 @@
#
from reportlab.lib.units import inch
-from .common import Barcode
+from reportlab.graphics.barcode.common import Barcode
import string
# . 3 T Tracker
--- a/src/reportlab/graphics/barcode/lto.py Thu Jan 09 12:54:10 2014 +0000
+++ b/src/reportlab/graphics/barcode/lto.py Thu Jan 09 13:53:18 2014 +0000
@@ -1,7 +1,7 @@
# (c) 2008 Jerome Alet - <alet@librelogiciel.com>
# Licensing terms : ReportLab's license.
-from .code39 import Standard39
+from reportlab.graphics.barcode.code39 import Standard39
from reportlab.lib import colors
from reportlab.lib.units import cm
from string import digits as string_digits
--- a/src/reportlab/graphics/barcode/usps.py Thu Jan 09 12:54:10 2014 +0000
+++ b/src/reportlab/graphics/barcode/usps.py Thu Jan 09 13:53:18 2014 +0000
@@ -31,7 +31,7 @@
#
from reportlab.lib.units import inch
-from .common import Barcode
+from reportlab.graphics.barcode.common import Barcode
from string import digits as string_digits, whitespace as string_whitespace
_fim_patterns = {
--- a/src/reportlab/graphics/barcode/usps4s.py Thu Jan 09 12:54:10 2014 +0000
+++ b/src/reportlab/graphics/barcode/usps4s.py Thu Jan 09 13:53:18 2014 +0000
@@ -4,7 +4,7 @@
__all__ = ('USPS_4State',)
from reportlab.lib.colors import black
-from .common import Barcode
+from reportlab.graphics.barcode.common import Barcode
class USPS_4State(Barcode):
''' USPS 4-State OneView (TM) barcode. All info from USPS-B-3200A
--- a/src/reportlab/graphics/charts/barcharts.py Thu Jan 09 12:54:10 2014 +0000
+++ b/src/reportlab/graphics/charts/barcharts.py Thu Jan 09 13:53:18 2014 +0000
@@ -886,7 +886,7 @@
g.add((1,z0,z1,x,y,width,height,rowNo,colNo))
def makeBars(self):
- from .utils3d import _draw_3d_bar
+ from reportlab.graphics.charts.utils3d import _draw_3d_bar
fg = _FakeGroup(cmp=self._cmpZ)
self._makeBars(fg,fg)
fg.sort()
--- a/src/reportlab/graphics/charts/linecharts.py Thu Jan 09 12:54:10 2014 +0000
+++ b/src/reportlab/graphics/charts/linecharts.py Thu Jan 09 13:53:18 2014 +0000
@@ -467,7 +467,7 @@
theta_x = self.theta_x
theta_y = self.theta_y
F = _FakeGroup()
- from .utils3d import _make_3d_line_info
+ from reportlab.graphics.charts.utils3d import _make_3d_line_info
tileWidth = getattr(self,'_3d_tilewidth',None)
if not tileWidth and self.categoryAxis.style!='parallel_3d': tileWidth = 1
--- a/src/reportlab/graphics/charts/lineplots.py Thu Jan 09 12:54:10 2014 +0000
+++ b/src/reportlab/graphics/charts/lineplots.py Thu Jan 09 13:53:18 2014 +0000
@@ -71,7 +71,7 @@
class PolyFiller(Filler,Polygon):
pass
-from .linecharts import AbstractLineChart
+from reportlab.graphics.charts.linecharts import AbstractLineChart
class LinePlot(AbstractLineChart):
"""Line plot with multiple lines.
@@ -474,10 +474,10 @@
_zadjust = self._zadjust
theta_x = self.theta_x
theta_y = self.theta_y
- from .linecharts import _FakeGroup
+ from reportlab.graphics.charts.linecharts import _FakeGroup
F = _FakeGroup()
- from .utils3d import _make_3d_line_info, find_intersections
+ from reportlab.graphics.charts.utils3d import _make_3d_line_info, find_intersections
if self.xValueAxis.style!='parallel_3d':
tileWidth = getattr(self,'_3d_tilewidth',1)
if getattr(self,'_find_intersections',None):
--- a/src/reportlab/graphics/charts/spider.py Thu Jan 09 12:54:10 2014 +0000
+++ b/src/reportlab/graphics/charts/spider.py Thu Jan 09 13:53:18 2014 +0000
@@ -30,7 +30,7 @@
from reportlab.graphics.widgetbase import Widget, TypedPropertyCollection, PropHolder
from reportlab.graphics.charts.areas import PlotArea
from reportlab.graphics.charts.legends import _objStr
-from .piecharts import WedgeLabel
+from reportlab.graphics.charts.piecharts import WedgeLabel
from reportlab.graphics.widgets.markers import makeMarker, uSymbol2Symbol, isSymbol
class StrandProperty(PropHolder):
--- a/src/reportlab/graphics/renderPDF.py Thu Jan 09 12:54:10 2014 +0000
+++ b/src/reportlab/graphics/renderPDF.py Thu Jan 09 13:53:18 2014 +0000
@@ -20,7 +20,7 @@
from reportlab.pdfbase.pdfmetrics import stringWidth
from reportlab.lib.utils import getBytesIO
from reportlab import rl_config
-from .renderbase import Renderer, StateTracker, getStateDelta, renderScaledDrawing
+from reportlab.graphics.renderbase import Renderer, StateTracker, getStateDelta, renderScaledDrawing
# the main entry point for users...
def draw(drawing, canvas, x, y, showBoundary=rl_config._unset_):
--- a/src/reportlab/graphics/renderPS.py Thu Jan 09 12:54:10 2014 +0000
+++ b/src/reportlab/graphics/renderPS.py Thu Jan 09 13:53:18 2014 +0000
@@ -674,7 +674,7 @@
from reportlab.graphics import renderPS
renderPS.draw(drawing, canvas, x, y)
Execute the script to see some test drawings."""
-from .shapes import *
+from reportlab.graphics.shapes import *
# hack so we only get warnings once each
#warnOnce = WarnOnce()
@@ -897,7 +897,7 @@
if not os.path.isdir(outdir):
os.mkdir(outdir)
#grab all drawings from the test module
- from . import testshapes
+ from reportlab.graphics import testshapes
drawings = []
for funcname in dir(testshapes):
--- a/src/reportlab/graphics/samples/bubble.py Thu Jan 09 12:54:10 2014 +0000
+++ b/src/reportlab/graphics/samples/bubble.py Thu Jan 09 13:53:18 2014 +0000
@@ -3,7 +3,7 @@
from reportlab.graphics.charts.lineplots import ScatterPlot
from reportlab.graphics.shapes import Drawing, _DrawingEditorMixin, String
from reportlab.graphics.charts.textlabels import Label
-from .excelcolors import *
+from reportlab.graphics.samples.excelcolors import *
class Bubble(_DrawingEditorMixin,Drawing):
def __init__(self,width=200,height=150,*args,**kw):
--- a/src/reportlab/graphics/samples/clustered_bar.py Thu Jan 09 12:54:10 2014 +0000
+++ b/src/reportlab/graphics/samples/clustered_bar.py Thu Jan 09 13:53:18 2014 +0000
@@ -1,6 +1,6 @@
#Autogenerated by ReportLab guiedit do not edit
from reportlab.graphics.charts.legends import Legend
-from .excelcolors import *
+from reportlab.graphics.samples.excelcolors import *
from reportlab.graphics.charts.barcharts import HorizontalBarChart
from reportlab.graphics.shapes import Drawing, _DrawingEditorMixin, String
from reportlab.graphics.charts.textlabels import Label
--- a/src/reportlab/graphics/samples/clustered_column.py Thu Jan 09 12:54:10 2014 +0000
+++ b/src/reportlab/graphics/samples/clustered_column.py Thu Jan 09 13:53:18 2014 +0000
@@ -1,6 +1,6 @@
#Autogenerated by ReportLab guiedit do not edit
from reportlab.graphics.charts.legends import Legend
-from .excelcolors import *
+from reportlab.graphics.samples.excelcolors import *
from reportlab.graphics.charts.barcharts import VerticalBarChart
from reportlab.graphics.shapes import Drawing, _DrawingEditorMixin, String
from reportlab.graphics.charts.textlabels import Label
--- a/src/reportlab/graphics/samples/exploded_pie.py Thu Jan 09 12:54:10 2014 +0000
+++ b/src/reportlab/graphics/samples/exploded_pie.py Thu Jan 09 13:53:18 2014 +0000
@@ -1,6 +1,6 @@
#Autogenerated by ReportLab guiedit do not edit
from reportlab.graphics.charts.piecharts import Pie
-from .excelcolors import *
+from reportlab.graphics.samples.excelcolors import *
from reportlab.graphics.widgets.grids import ShadedRect
from reportlab.graphics.charts.legends import Legend
from reportlab.graphics.shapes import Drawing, _DrawingEditorMixin, String
--- a/src/reportlab/graphics/samples/filled_radar.py Thu Jan 09 12:54:10 2014 +0000
+++ b/src/reportlab/graphics/samples/filled_radar.py Thu Jan 09 13:53:18 2014 +0000
@@ -3,7 +3,7 @@
from reportlab.graphics.charts.spider import SpiderChart
from reportlab.graphics.shapes import Drawing, _DrawingEditorMixin, String
from reportlab.graphics.charts.textlabels import Label
-from .excelcolors import *
+from reportlab.graphics.samples.excelcolors import *
class FilledRadarChart(_DrawingEditorMixin,Drawing):
def __init__(self,width=200,height=150,*args,**kw):
--- a/src/reportlab/graphics/samples/line_chart.py Thu Jan 09 12:54:10 2014 +0000
+++ b/src/reportlab/graphics/samples/line_chart.py Thu Jan 09 13:53:18 2014 +0000
@@ -3,7 +3,7 @@
from reportlab.graphics.charts.lineplots import LinePlot
from reportlab.graphics.shapes import Drawing, _DrawingEditorMixin, String
from reportlab.graphics.charts.textlabels import Label
-from .excelcolors import *
+from reportlab.graphics.samples.excelcolors import *
class LineChart(_DrawingEditorMixin,Drawing):
def __init__(self,width=200,height=150,*args,**kw):
--- a/src/reportlab/graphics/samples/linechart_with_markers.py Thu Jan 09 12:54:10 2014 +0000
+++ b/src/reportlab/graphics/samples/linechart_with_markers.py Thu Jan 09 13:53:18 2014 +0000
@@ -4,7 +4,7 @@
from reportlab.graphics.shapes import Drawing, _DrawingEditorMixin, String
from reportlab.graphics.widgets.markers import makeMarker
from reportlab.graphics.charts.textlabels import Label
-from .excelcolors import *
+from reportlab.graphics.samples.excelcolors import *
class LineChartWithMarkers(_DrawingEditorMixin,Drawing):
def __init__(self,width=200,height=150,*args,**kw):
--- a/src/reportlab/graphics/samples/radar.py Thu Jan 09 12:54:10 2014 +0000
+++ b/src/reportlab/graphics/samples/radar.py Thu Jan 09 13:53:18 2014 +0000
@@ -1,6 +1,6 @@
#Autogenerated by ReportLab guiedit do not edit
from reportlab.graphics.charts.legends import Legend
-from .excelcolors import *
+from reportlab.graphics.samples.excelcolors import *
from reportlab.graphics.charts.spider import SpiderChart
from reportlab.graphics.shapes import Drawing, _DrawingEditorMixin, String
from reportlab.graphics.charts.textlabels import Label
--- a/src/reportlab/graphics/samples/scatter.py Thu Jan 09 12:54:10 2014 +0000
+++ b/src/reportlab/graphics/samples/scatter.py Thu Jan 09 13:53:18 2014 +0000
@@ -3,7 +3,7 @@
from reportlab.graphics.charts.lineplots import ScatterPlot
from reportlab.graphics.shapes import Drawing, _DrawingEditorMixin, String
from reportlab.graphics.charts.textlabels import Label
-from .excelcolors import *
+from reportlab.graphics.samples.excelcolors import *
class Scatter(_DrawingEditorMixin,Drawing):
def __init__(self,width=200,height=150,*args,**kw):
--- a/src/reportlab/graphics/samples/scatter_lines.py Thu Jan 09 12:54:10 2014 +0000
+++ b/src/reportlab/graphics/samples/scatter_lines.py Thu Jan 09 13:53:18 2014 +0000
@@ -3,7 +3,7 @@
from reportlab.graphics.charts.lineplots import ScatterPlot
from reportlab.graphics.shapes import Drawing, _DrawingEditorMixin, String
from reportlab.graphics.charts.textlabels import Label
-from .excelcolors import *
+from reportlab.graphics.samples.excelcolors import *
class ScatterLines(_DrawingEditorMixin,Drawing):
def __init__(self,width=200,height=150,*args,**kw):
--- a/src/reportlab/graphics/samples/scatter_lines_markers.py Thu Jan 09 12:54:10 2014 +0000
+++ b/src/reportlab/graphics/samples/scatter_lines_markers.py Thu Jan 09 13:53:18 2014 +0000
@@ -3,7 +3,7 @@
from reportlab.graphics.charts.lineplots import ScatterPlot
from reportlab.graphics.shapes import Drawing, _DrawingEditorMixin, String
from reportlab.graphics.charts.textlabels import Label
-from .excelcolors import *
+from reportlab.graphics.samples.excelcolors import *
class ScatterLinesMarkers(_DrawingEditorMixin,Drawing):
def __init__(self,width=200,height=150,*args,**kw):
--- a/src/reportlab/graphics/samples/simple_pie.py Thu Jan 09 12:54:10 2014 +0000
+++ b/src/reportlab/graphics/samples/simple_pie.py Thu Jan 09 13:53:18 2014 +0000
@@ -4,7 +4,7 @@
from reportlab.graphics.charts.legends import Legend
from reportlab.graphics.shapes import Drawing, _DrawingEditorMixin, String
from reportlab.graphics.charts.textlabels import Label
-from .excelcolors import *
+from reportlab.graphics.samples.excelcolors import *
class SimplePie(_DrawingEditorMixin,Drawing):
def __init__(self,width=200,height=150,*args,**kw):
--- a/src/reportlab/graphics/samples/stacked_bar.py Thu Jan 09 12:54:10 2014 +0000
+++ b/src/reportlab/graphics/samples/stacked_bar.py Thu Jan 09 13:53:18 2014 +0000
@@ -3,7 +3,7 @@
from reportlab.graphics.charts.barcharts import HorizontalBarChart
from reportlab.graphics.shapes import Drawing, _DrawingEditorMixin, String
from reportlab.graphics.charts.textlabels import Label
-from .excelcolors import *
+from reportlab.graphics.samples.excelcolors import *
class StackedBar(_DrawingEditorMixin,Drawing):
def __init__(self,width=200,height=150,*args,**kw):
--- a/src/reportlab/graphics/samples/stacked_column.py Thu Jan 09 12:54:10 2014 +0000
+++ b/src/reportlab/graphics/samples/stacked_column.py Thu Jan 09 13:53:18 2014 +0000
@@ -3,7 +3,7 @@
from reportlab.graphics.charts.barcharts import VerticalBarChart
from reportlab.graphics.shapes import Drawing, _DrawingEditorMixin, String
from reportlab.graphics.charts.textlabels import Label
-from .excelcolors import *
+from reportlab.graphics.samples.excelcolors import *
class StackedColumn(_DrawingEditorMixin,Drawing):
def __init__(self,width=200,height=150,*args,**kw):
--- a/src/reportlab/graphics/shapes.py Thu Jan 09 12:54:10 2014 +0000
+++ b/src/reportlab/graphics/shapes.py Thu Jan 09 13:53:18 2014 +0000
@@ -671,7 +671,7 @@
"""This is used by the Platypus framework to let the document
draw itself in a story. It is specific to PDF and should not
be used directly."""
- from . import renderPDF
+ from reportlab.graphics import renderPDF
renderPDF.draw(self, self.canv, 0, 0, showBoundary=showBoundary)
def wrap(self, availWidth, availHeight):
--- a/src/reportlab/graphics/testshapes.py Thu Jan 09 12:54:10 2014 +0000
+++ b/src/reportlab/graphics/testshapes.py Thu Jan 09 13:53:18 2014 +0000
@@ -384,7 +384,7 @@
return D
-from .widgets.signsandsymbols import SmileyFace
+from reportlab.graphics.widgets.signsandsymbols import SmileyFace
def getDrawing11():
'''test of anchoring'''
def makeSmiley(x, y, size, color):
--- a/src/reportlab/graphics/widgetbase.py Thu Jan 09 12:54:10 2014 +0000
+++ b/src/reportlab/graphics/widgetbase.py Thu Jan 09 13:53:18 2014 +0000
@@ -504,7 +504,7 @@
d = shapes.Drawing(400, 200)
tc = TwoCircles()
d.add(tc)
- from . import renderPDF
+ from reportlab.graphics import renderPDF
renderPDF.drawToFile(d, 'sample_widget.pdf', 'A Sample Widget')
print('saved sample_widget.pdf')
--- a/src/reportlab/graphics/widgets/flags.py Thu Jan 09 12:54:10 2014 +0000
+++ b/src/reportlab/graphics/widgets/flags.py Thu Jan 09 13:53:18 2014 +0000
@@ -36,7 +36,7 @@
from reportlab.graphics.shapes import Line, Rect, Polygon, Drawing, Group, String, Circle, Wedge
from reportlab.graphics.widgetbase import Widget
from reportlab.graphics import renderPDF
-from .signsandsymbols import _Symbol
+from reportlab.graphics.widgets.signsandsymbols import _Symbol
import copy
from math import sin, cos, pi
--- a/src/reportlab/lib/colors.py Thu Jan 09 12:54:10 2014 +0000
+++ b/src/reportlab/lib/colors.py Thu Jan 09 13:53:18 2014 +0000
@@ -713,7 +713,7 @@
# uses a singleton for efficiency
global _namedColors
if _namedColors is not None: return _namedColors
- from . import colors
+ from reportlab.lib import colors
_namedColors = {}
for name, value in colors.__dict__.items():
if isinstance(value, Color):
--- a/src/reportlab/lib/textsplit.py Thu Jan 09 12:54:10 2014 +0000
+++ b/src/reportlab/lib/textsplit.py Thu Jan 09 13:53:18 2014 +0000
@@ -237,5 +237,5 @@
if __name__=='__main__':
import doctest
- from . import textsplit
+ from reportlab.lib import textsplit
doctest.testmod(textsplit)
--- a/src/reportlab/pdfbase/cidfonts.py Thu Jan 09 12:54:10 2014 +0000
+++ b/src/reportlab/pdfbase/cidfonts.py Thu Jan 09 13:53:18 2014 +0000
@@ -508,7 +508,7 @@
if __name__=='__main__':
import doctest
- from . import cidfonts
+ from reportlab.pdfbase import cidfonts
doctest.testmod(cidfonts)
#test()
--- a/src/reportlab/pdfbase/pdfdoc.py Thu Jan 09 12:54:10 2014 +0000
+++ b/src/reportlab/pdfbase/pdfdoc.py Thu Jan 09 13:53:18 2014 +0000
@@ -377,7 +377,7 @@
def getAvailableFonts(self):
fontnames = list(self.fontMapping.keys())
# the standard 14 are also always available! (even if not initialized yet)
- from . import _fontdata
+ from reportlab.pdfbase import _fontdata
for name in _fontdata.standardFonts:
if name not in fontnames:
fontnames.append(name)
@@ -757,7 +757,7 @@
class PDFStreamFilterBase85Encode:
pdfname = "ASCII85Decode"
def encode(self, text):
- from .pdfutils import _wrap
+ from reportlab.pdfbase.pdfutils import _wrap
text = asciiBase85Encode(text)
if rl_config.wrapA85:
text = _wrap(text)
--- a/src/reportlab/pdfbase/pdfform.py Thu Jan 09 12:54:10 2014 +0000
+++ b/src/reportlab/pdfbase/pdfform.py Thu Jan 09 13:53:18 2014 +0000
@@ -120,7 +120,7 @@
#==========================end of public interfaces
-from .pdfpattern import PDFPattern
+from reportlab.pdfbase.pdfpattern import PDFPattern
def getForm(canvas):
"get form from canvas, create the form if needed"
--- a/src/reportlab/pdfbase/pdfmetrics.py Thu Jan 09 12:54:10 2014 +0000
+++ b/src/reportlab/pdfbase/pdfmetrics.py Thu Jan 09 13:53:18 2014 +0000
@@ -24,7 +24,7 @@
from reportlab.lib.utils import rl_isfile, rl_glob, rl_isdir, open_and_read, open_and_readlines, findInPaths, isSeq, isStr, isUnicode, isPy3
from reportlab.rl_config import defaultEncoding, T1SearchPath
from reportlab.lib.rl_accel import unicode2T1, instanceStringWidthT1
-from . import rl_codecs
+from reportlab.pdfbase import rl_codecs
_notdefChar = b'n'
rl_codecs.RL_Codecs.register()
--- a/src/reportlab/pdfbase/pdfutils.py Thu Jan 09 12:54:10 2014 +0000
+++ b/src/reportlab/pdfbase/pdfutils.py Thu Jan 09 13:53:18 2014 +0000
@@ -217,7 +217,7 @@
"Read width, height and number of components from open JPEG file."
import struct
- from .pdfdoc import PDFError
+ from reportlab.pdfbase.pdfdoc import PDFError
#Acceptable JPEG Markers:
# SROF0=baseline, SOF1=extended sequential or SOF2=progressive
--- a/src/reportlab/pdfbase/rl_codecs.py Thu Jan 09 12:54:10 2014 +0000
+++ b/src/reportlab/pdfbase/rl_codecs.py Thu Jan 09 13:53:18 2014 +0000
@@ -1041,7 +1041,7 @@
def _rl_codecs(name):
name = name.lower()
- from .pdfmetrics import standardEncodings
+ from reportlab.pdfbase.pdfmetrics import standardEncodings
for e in standardEncodings+('ExtPdfdocEncoding',):
e = e[:-8].lower()
if name.startswith(e): return RL_Codecs.__rl_codecs(e)
--- a/src/reportlab/pdfgen/canvas.py Thu Jan 09 12:54:10 2014 +0000
+++ b/src/reportlab/pdfgen/canvas.py Thu Jan 09 13:53:18 2014 +0000
@@ -822,7 +822,7 @@
"""
self._currentPageHasImages = 1
- from .pdfimages import PDFImage
+ from reportlab.pdfgen.pdfimages import PDFImage
img_obj = PDFImage(image, x,y, width, height)
img_obj.drawInlineImage(self,
preserveAspectRatio=preserveAspectRatio,
--- a/src/reportlab/platypus/__init__.py Thu Jan 09 12:54:10 2014 +0000
+++ b/src/reportlab/platypus/__init__.py Thu Jan 09 13:53:18 2014 +0000
@@ -13,4 +13,4 @@
from reportlab.platypus.frames import Frame
from reportlab.platypus.doctemplate import BaseDocTemplate, NextPageTemplate, PageTemplate, ActionFlowable, \
SimpleDocTemplate, FrameBreak, PageBegin, Indenter, NotAtTopPageBreak
-from .xpreformatted import XPreformatted
+from reportlab.platypus.xpreformatted import XPreformatted
--- a/src/reportlab/platypus/doctemplate.py Thu Jan 09 12:54:10 2014 +0000
+++ b/src/reportlab/platypus/doctemplate.py Thu Jan 09 13:53:18 2014 +0000
@@ -195,7 +195,7 @@
def _evalMeasurement(n):
if isinstance(n,str):
- from .paraparser import _num
+ from reportlab.platypus.paraparser import _num
n = _num(n)
if isSeq(n): n = n[1]
return n
@@ -1193,7 +1193,7 @@
objects_to_draw = []
from reportlab.lib.styles import ParagraphStyle
#from paragraph import Paragraph
- from .doctemplate import SimpleDocTemplate
+ from reportlab.platypus.doctemplate import SimpleDocTemplate
#need a style
normal = ParagraphStyle('normal')
--- a/src/reportlab/platypus/flowables.py Thu Jan 09 12:54:10 2014 +0000
+++ b/src/reportlab/platypus/flowables.py Thu Jan 09 13:53:18 2014 +0000
@@ -546,7 +546,7 @@
if availHeight<self.height:
f = self._doctemplateAttr('frame')
if not f: return availWidth, availHeight
- from .doctemplate import FrameBreak
+ from reportlab.platypus.doctemplate import FrameBreak
f.add_generated_content(FrameBreak)
return 0, 0
@@ -607,7 +607,7 @@
def _flowableSublist(V):
"if it isn't a list or tuple, wrap it in a list"
if not isinstance(V,(list,tuple)): V = V is not None and [V] or []
- from .doctemplate import LCActionFlowable
+ from reportlab.platypus.doctemplate import LCActionFlowable
assert not [x for x in V if isinstance(x,LCActionFlowable)],'LCActionFlowables not allowed in sublists'
return V
@@ -657,10 +657,10 @@
C1 = (self._H0>aH) or C0 and atTop
if C0 or C1:
if C0:
- from .doctemplate import FrameBreak
+ from reportlab.platypus.doctemplate import FrameBreak
A = FrameBreak
else:
- from .doctemplate import NullActionFlowable
+ from reportlab.platypus.doctemplate import NullActionFlowable
A = NullActionFlowable
S.insert(0,A())
return S
@@ -836,7 +836,7 @@
class _Container(_ContainerSpace): #Abstract some common container like behaviour
def drawOn(self, canv, x, y, _sW=0, scale=1.0, content=None, aW=None):
'''we simulate being added to a frame'''
- from .doctemplate import ActionFlowable, Indenter
+ from reportlab.platypus.doctemplate import ActionFlowable, Indenter
x0 = x
y0 = y
pS = 0
@@ -1057,7 +1057,7 @@
getattr(self,'maxHeight','')and (' maxHeight=%s' % fp_str(getattr(self,'maxHeight')))or '')
def wrap(self,availWidth,availHeight):
- from .doctemplate import LayoutError
+ from reportlab.platypus.doctemplate import LayoutError
mode = self.mode
maxWidth = float(min(self.maxWidth or availWidth,availWidth))
maxHeight = float(min(self.maxHeight or availHeight,availHeight))
@@ -1268,7 +1268,7 @@
return W, availHeight, F[:i],F[i:]
H += h
if H>availHeight:
- from .paragraph import Paragraph
+ from reportlab.platypus.paragraph import Paragraph
aH = availHeight-(H-h)
if isinstance(f,(Paragraph,Preformatted)):
leading = f.style.leading
--- a/src/reportlab/platypus/para.py Thu Jan 09 12:54:10 2014 +0000
+++ b/src/reportlab/platypus/para.py Thu Jan 09 13:53:18 2014 +0000
@@ -1973,7 +1973,7 @@
Controller["title"] = theParaMapper
def handleSpecialCharacters(engine, text, program=None):
- from .paraparser import greeks
+ from reportlab.platypus.paraparser import greeks
from string import whitespace
standard={'lt':'<', 'gt':'>', 'amp':'&'}
# add space prefix if space here