Back to index

plone3  3.1.7
Classes | Functions | Variables
kupu.plone.plonedrawers Namespace Reference

Classes

class  ResourceType
class  InfoAdaptor
class  PloneDrawers

Functions

def getSiteEncoding
def filterControlChars

Variables

 HAS_PIL = False
tuple UIDURL = re.compile(".*\\bresolveuid/([^/?#]+)")
tuple NOCC = noccstring.maketrans(''.join([chr(c) for c in range(32) if c not in (9,10,13)]), "?"*29)
tuple uNOCC = dict([(c,ord('?')) for c in range(32) if c not in (9,10,13)])
dictionary IMAGE_SIZES_CACHE = {}

Function Documentation

convert characters which are illegal in xml to '?'

Definition at line 47 of file plonedrawers.py.

00047 
00048 def filterControlChars(s):
00049     """convert characters which are illegal in xml to '?'"""
00050     if isinstance(s, unicode):
00051         return s.translate(uNOCC)
00052     else:
00053         return s.translate(NOCC)
00054 
00055 # mapping (thread-id, portal-physicalPath, portal_type) ->
# imagefield-getAvailableSizes (as tuple sorted by dimension) (width, height, key)

Here is the caller graph for this function:

Definition at line 31 of file plonedrawers.py.

00031 
00032     def getSiteEncoding(context):
00033         tool = getToolByName(context, 'plone_utils')
00034         return tool.getSiteEncoding()
    

Here is the call graph for this function:


Variable Documentation

Definition at line 40 of file plonedrawers.py.

Definition at line 56 of file plonedrawers.py.

tuple kupu.plone.plonedrawers.NOCC = noccstring.maketrans(''.join([chr(c) for c in range(32) if c not in (9,10,13)]), "?"*29)

Definition at line 45 of file plonedrawers.py.

tuple kupu.plone.plonedrawers.UIDURL = re.compile(".*\\bresolveuid/([^/?#]+)")

Definition at line 44 of file plonedrawers.py.

tuple kupu.plone.plonedrawers.uNOCC = dict([(c,ord('?')) for c in range(32) if c not in (9,10,13)])

Definition at line 46 of file plonedrawers.py.