[reportlab-users] [Patch]platypus.doctempate breaks emacs syntax
coloring
Thomas Heller
theller at python.net
Tue Sep 12 15:58:09 EDT 2006
Here's a patch for platypus/doctemplate.py which will not break
emacs syntax coloring. The coloring in emacs itself is broken,
it is messed up when a triple quoted string contains one of the
quotes in the text itself.
There was also this wrong quoting:
def notify(self, kind, stuff):
""""Forward to any listeners"""
for l in self._indexingFlowables:
l.notify(kind, stuff)
Thomas
-------------- next part --------------
Index: doctemplate.py
===================================================================
--- doctemplate.py (Revision 2969)
+++ doctemplate.py (Arbeitskopie)
@@ -224,11 +224,11 @@
pass
def checkPageSize(self,canv,doc):
- '''This gets called by the template framework
+ """This gets called by the template framework
If canv size != template size then the canv size is set to
the template size or if that's not available to the
doc size.
- '''
+ """
#### NEVER EVER EVER COMPARE FLOATS FOR EQUALITY
#RGB converting pagesizes to ints means we are accurate to one point
#RGB I suggest we should be aiming a little better
@@ -405,8 +405,8 @@
self.beforeDocument()
def handle_pageBegin(self):
- '''Perform actions required at beginning of page.
- shouldn't normally be called directly'''
+ """Perform actions required at beginning of page.
+ shouldn't normally be called directly"""
self.page += 1
if self._debug: logger.debug("beginning page %d" % self.page)
self.pageTemplate.beforeDrawPage(self.canv,self)
@@ -760,7 +760,7 @@
return allHappy
def notify(self, kind, stuff):
- """"Forward to any listeners"""
+ """Forward to any listeners"""
for l in self._indexingFlowables:
l.notify(kind, stuff)
More information about the reportlab-users
mailing list