module documentation

ZMS standard utility module

This module provides helpful functions and classes for use in Python Scripts. It can be accessed from Python with the statement "import Products.zms.standard"

Class initutil Define the initialize() util.
Function addZMSCustom Public alias for manage_addZMSCustom: add a custom node of the type designated by meta_id in current context.
Function aggregate_list Aggregates given field in list.
Function cmp Undocumented
Function compareDate Compares two dates t0 and t1 and returns result:
Function concat_list Concatenates two lists (l1 + l2).
Function copy_list Copies list l.
Function daysBetween Returns number of days between date t0 and t1.
Function dict_list Converts list to dictionary: key=l[x*2], value=l[x*2+1]
Function difference_list Difference of two lists (l1 - l2).
Function distinct_list Returns distinct values of given field from list.
Function dt_exec Try to execute given value.
Function dt_executable Returns if given value is executable.
Function dt_html Execute given DTML-snippet.
Function dt_py Execute given Python-script.
Function dt_tal Execute given TAL-snippet.
Function encrypt_ordtype Encrypts given string with entities by random algorithm.
Function encrypt_password Encrypts given password.
Function encrypt_schemes Available encryption-schemes.
Function FileFromData Creates a new instance of a file from given data.
Function filter_list Filters list by given field.
Function format_datetime_iso Undocumented
Function get_installed_packages Undocumented
Function get_session Get http-session.
Function get_session_value Get http-session-value.
Function getDataSizeStr Returns display string for file-size (KB).
Function getDateTime Since Python 2.2 the type of objects from the time-module are time.struct_time instead of tuples. struct_time is compatible with tuple. This is no problem for Zope since Zope uses its own, more flexible, type DateTime...
Function getFileTypeIconCSS Returns the FontAwesome CSS class of an icon representing the specified file type.
Function getINSTANCE_HOME Returns path to Instance
Function getLangFmtDate Formats date in locale-format
Function getLog Get zms_log.
Function getMimeTypeIconSrc Returns the absolute-url of an icon representing the specified MIME-type.
Function getPACKAGE_HOME Returns path to lib/site-packages.
Function getPlugin Executes plugin.
Function getPRODUCT_HOME Returns home-folder of this Product.
Function getTempFile Get file fromn temp_folder.
Function getXmlHeader Returns XML-Header (encoding=utf-8)
Function guess_content_type Guess the type of a file based on its filename and the data.
Function html_quote Undocumented
Function htmldiff Wrapper for htmldiff2.render_html_diff.
Function http_import Send Http-Request and return Response-Body.
Function http_request Undocumented
Function id_prefix Returns prefix from identifier (which is the non-numeric part at the beginning).
Function id_quote Converts given string to identifier (removes special-characters and replaces German umlauts).
Function ImageFromData Creates a new instance of an image from given data.
Function initZMS Undocumented
Function intersection_list Intersection of two lists (li & l2).
Function is_conf_enabled Returns True if given setting is activated in system properties (= in [True,'true','True',1,'1']) or given setting is found in system property ZMS.Features.enabled (either surrounded by % or not) in current client or inherited from portal masters PLEASE NOTE: System properties with prefix ASP...
Function is_equal Compare the two objects x and y for equality.
Function isManagementInterface Returns true if current context is management-interface, false else.
Function isPreviewRequest Returns true if current context is preview-request, false else.
Function localfs_read Reads file from local file-system. You must grant permissions for reading from local file-system to directories in Config-Tab / Miscelleaneous-Section.
Function localfs_readPath Reads path from local file-system.
Function localfs_remove Removes file from local file-system.
Function localfs_write Writes value to file to local file-system.
Function nvl Returns its first argument if it is not equal to third argument (None), otherwise it returns its second argument.
Function once once per request
Function operator_contains Check if collection contains value.
Function operator_delattr Delete key from python-object.
Function operator_delitem Delete key from python-dictionary.
Function operator_getattr Retrieves value for key from python-object. This is a convenience-function since the use expressions like getattr(a,b,c) is restricted in DTML.
Function operator_getitem Retrieves value for key from python-dictionary.
Function operator_gettype Returns python-type of given value.
Function operator_itemgetter Undocumented
Function operator_setattr Applies value for key to python-object. This is a convenience-function since the use expressions like setattr(a,b,c) is restricted in DTML.
Function operator_setitem Applies value for key in python-dictionary. This is a convenience-function since it is not possible to use expressions like a[b]=c in DTML.
Function parse_json Returns an object representation of the json-string.
Function parseLangFmtDate Parses a string representing a date by trying a variety of different parsers. The parse will try each parse pattern in turn. A parse is only deemed successful if it parses the whole of the input string...
Function parseXmlString Parse value from ZMS XML-Structure.
Function processData Process data with custom transformation.
Function pybool Undocumented
Function pystr Undocumented
Function qs_append Append to query-string.
Function raiseError Raise error
Function rand_int Random integer in given range.
Function re_findall Return all non-overlapping matches of pattern in string, as a list of strings. The string is scanned left-to-right, and matches are returned in the order found. If one or more groups are present in the pattern, return a list of groups; this will be a list of tuples if the pattern has more than one group...
Function re_search Scan through string looking for a location where the regular expression pattern produces a match, and return a corresponding MatchObject instance. Return None if no position in the string matches the pattern; note that this is different from finding a zero-length match at some point in the string...
Function re_sub Performs a search-and-replace across subject, replacing all matches of regex in subject with replacement. The result is returned by the sub() function. The subject string you pass is not modified. Convenience-function since re cannot be imported in restricted python.
Function remove_tags Undocumented
Function scalar Undocumented
Function sendMail Sends Mail via MailHost.
Function set_response_headers Set content-type and -disposition to response-headers.
Function set_response_headers_cache Set default and dynamic cache response headers according to ZMS_CACHE_EXPIRE_DATETIME which is determined in ObjAttrs.isActive for each page element as the earliest time for invalidation.
Function set_session_value Set http-session-value.
Function sort_item Undocumented
Function sort_list Sorts list by given field.
Function str_item Returns a string representation of the item.
Function str_json Returns a json-string representation of the object.
Function string_list Split string by given separator and trim items.
Function string_maxlen Returns string with specified maximum-length. If original string exceeds maximum-length '...' is appended at the end.
Function stripDateTime Strips time portion from date-time and returns date.
Function sync_list Synchronizes list l with new list nl using the column i as identifier.
Function todayInRange Checks if today is in given range.
Function toXmlString Serializes value to ZMS XML-Structure.
Function triggerEvent Hook for trigger of custom event (if there is one)
Function umlaut_quote Replace umlauts in s using given mapping.
Function unencode Unencodes given parameter.
Function unescape Unescape
Function url_append_params Append params from dict to given url.
Function url_encode All unsafe characters must always be encoded within a URL.
Function url_inherit_params Inerits params from request to given url.
Function url_quote Undocumented
Function writeBlock Log information.
Function writeError Log error.
Function writeLog Log debug-information.
Function writeStdout Write to standard-out (only allowed for development-purposes!).
Function zmi_paths Undocumented
Variable security Undocumented
Variable umlaut_map Undocumented
def addZMSCustom(self, meta_id=None, values={}, REQUEST=None): (source)

Public alias for manage_addZMSCustom: add a custom node of the type designated by meta_id in current context.

Parameters
self:zmsobject.ZMSObjectcontext node
meta_id:strthe meta-id / type of the new ZMSObject
values:dictthe dictionary of initial attribut-values assigned to the new ZMSObject
REQUEST:ZPublisher.HTTPRequestthe triggering request
Returns
zmsobject.ZMSObjectthe new node
def aggregate_list(l, i): (source)

Aggregates given field in list.

def cmp(x, y): (source)

Undocumented

def compareDate(t0, t1): (source)

Compares two dates t0 and t1 and returns result:

  +1: t0 < t1
   0: t0 == t1
  -1: t0 > t1
Returns
intA negative number if date t0 is before t1, zero if they are equal, or positive if t0 is after t1.
def concat_list(l1, l2): (source)

Concatenates two lists (l1 + l2).

Parameters
l1:listList #1
l2:listList #2
Returns
listConcatinated list
def copy_list(l): (source)

Copies list l.

Parameters
l:listList
Returns
listCopy of list.
def daysBetween(t0, t1): (source)

Returns number of days between date t0 and t1.

Parameters
t0:DateTime.DateTime|tuple|time.struct_timethe start date-time
t1:DateTime.DateTime|tuple|time.struct_timethe end date-time
Returns
intthe number of days between date t0 and t1.
def dict_list(l): (source)

Converts list to dictionary: key=l[x*2], value=l[x*2+1]

Parameters
l:listList
Returns
dictDictionary
def difference_list(l1, l2): (source)

Difference of two lists (l1 - l2).

Parameters
l1:listList #1
l2:listList #2
Returns
listDifference list
def distinct_list(l, i=None): (source)

Returns distinct values of given field from list.

Parameters
l:listList
iUndocumented
Returns
listUndocumented
def dt_exec(context, v, o={}): (source)

Try to execute given value.

Parameters
context:ZMSObjectthe context
v:strthe executable code
o:dictthe options
Returns
any
def dt_executable(v): (source)

Returns if given value is executable.

Parameters
v:strthe executable code
Returns
Bool
def dt_html(context, value, REQUEST): (source)

Execute given DTML-snippet.

Parameters
context:ZMSObjectthe context
value:stringDTML-snippet
REQUEST:ZPublisher.HTTPRequestthe triggering request
Returns
anyResult of the execution or None
def dt_py(context, script, kw={}): (source)

Execute given Python-script.

Parameters
context:ZMSObjectthe context
script:stringthe Python-script
kw:dictadditional options
Returns
anyResult of the execution or None
def dt_tal(context, text, options={}): (source)

Execute given TAL-snippet.

Parameters
context:ZMSObjectthe context
text:stringTAL-snippet
optionsUndocumented
Returns
anyResult of the execution or None
def encrypt_ordtype(s): (source)

Encrypts given string with entities by random algorithm.

Parameters
s:strString
Returns
strEncrypted string
def encrypt_password(pw, algorithm='md5', hex=False): (source)

Encrypts given password.

Parameters
pw:strPassword
algorithm:strEncryption-algorithm (md5, sha1, etc.)
hex:boolHexlify
Returns
strEncrypted password
def encrypt_schemes(): (source)

Available encryption-schemes.

Returns
listlist of encryption-scheme ids
def FileFromData(context, data, filename='', content_type=None): (source)

Creates a new instance of a file from given data.

Parameters
contextUndocumented
data:stringFile-data (binary)
filename:stringFilename
content_typeUndocumented
Returns
MyFileNew instance of file.
def filter_list(l, i, v, o='%'): (source)

Filters list by given field.

Parameters
l:listList
i:str or intField-name or -index
v:anyField-value
o:str, values are '%' (full-text), '=', '==', '>', '<', '>=', '<=', '!=', '<>'Match-operator
Returns
listFiltered list.
def format_datetime_iso(t): (source)

Undocumented

def get_installed_packages(pip_cmd='freeze'): (source)

Undocumented

def get_session(context): (source)

Get http-session.

def get_session_value(context, key, defaultValue=None): (source)

Get http-session-value.

def getDataSizeStr(len): (source)

Returns display string for file-size (KB).

Parameters
len:intlength (bytes)
Returns
strUndocumented
def getDateTime(t): (source)

Since Python 2.2 the type of objects from the time-module are time.struct_time instead of tuples. struct_time is compatible with tuple. This is no problem for Zope since Zope uses its own, more flexible, type DateTime. Nevertheless ZMS relies on the datatype "tuple" as DateTime has the limitation that no date prior to 1970-01-01 can be used!

Parameters
t:DateTime.DateTime|tuple|time.struct_timethe date-time
Returns
time.struct_timethe pythonic-time
def getFileTypeIconCSS(fn): (source)

Returns the FontAwesome CSS class of an icon representing the specified file type.

Parameters
fn:strfilename with extension (e.g. picture.gif).
Returns
strUndocumented
def getINSTANCE_HOME(): (source)

Returns path to Instance

Returns
strUndocumented
def getLangFmtDate(context, t, lang=None, fmt_str='SHORTDATETIME_FMT'): (source)

Formats date in locale-format

Parameters
contextUndocumented
t:struct_timeDatetime
lang:strLocale
fmt_strFormat-String, possible values SHORTDATETIME_FMT (default), SHORTDATE_FMT, DATETIME_FMT, DATE_FMT, DateTime, Day, Month, ISO8601, RFC2822
def getLog(context): (source)

Get zms_log.

def getMimeTypeIconSrc(mt): (source)

Returns the absolute-url of an icon representing the specified MIME-type.

Parameters
mt:strMIME-Type (e.g. image/gif, text/xml).
Returns
strUndocumented
def getPACKAGE_HOME(): (source)

Returns path to lib/site-packages.

Returns
strUndocumented
def getPlugin(context, path, options={}): (source)

Executes plugin.

Parameters
context:ZMSObjectthe context
path:stringthe plugin path in $ZMS_HOME/plugins/
options:dictthe options
def getPRODUCT_HOME(): (source)

Returns home-folder of this Product.

Returns
strUndocumented
def getTempFile(context, id): (source)

Get file fromn temp_folder.

def getXmlHeader(encoding='utf-8'): (source)

Returns XML-Header (encoding=utf-8)

Parameters
encoding:strEncoding
Returns
strUndocumented
def guess_content_type(filename, data): (source)

Guess the type of a file based on its filename and the data.

Parameters
filename:strFilename
data:strData
Returns
tupleTuple of MIME-type and encoding.
def html_quote(v, name='(Unknown name)', md={}): (source)

Undocumented

def htmldiff(original, changed): (source)

Wrapper for htmldiff2.render_html_diff.

Parameters
original:strhtml-file-0
changed:strhtml-file-1
def http_import(context, url, method='GET', auth=None, parse_qs=0, timeout=10, headers={'Accept': '*/*'}, debug=0): (source)

Send Http-Request and return Response-Body.

Parameters
contextUndocumented
url:strRemote-URL
method:str, values are GET or POSTMethod
auth:strAuthentication
parse_qs:int, values are 0 or 1Parse Query-String
timeout:int, values in secondsTime-Out [s]
headers:dictRequest-Headers
debug:int, values are 0 or 1Debug Mode will ignores Status Code of Return
Returns
strResponse-Body
def http_request(url, method='GET', return_type=None, **kwargs): (source)

Undocumented

def id_prefix(s): (source)

Returns prefix from identifier (which is the non-numeric part at the beginning).

Parameters
s:strIdentifier
Returns
strId-prefix
def id_quote(s, mapping={' ': '_', '-': '_', '/': '_'}): (source)

Converts given string to identifier (removes special-characters and replaces German umlauts).

Parameters
s:strString
mappingUndocumented
Returns
strIdentifier
def ImageFromData(context, data, filename='', content_type=None): (source)

Creates a new instance of an image from given data.

Parameters
contextUndocumented
data:stringImage-data (binary)
filename:stringFilename
content_typeUndocumented
Returns
MyImageNew instance of image.
def initZMS(self, id, titlealt, title, lang, manage_lang, REQUEST): (source)

Undocumented

def intersection_list(l1, l2): (source)

Intersection of two lists (li & l2).

Parameters
l1:listList #1
l2:listList #2
Returns
listIntersection list
def is_conf_enabled(context, setting): (source)

Returns True if given setting is activated in system properties (= in [True,'true','True',1,'1']) or given setting is found in system property ZMS.Features.enabled (either surrounded by % or not) in current client or inherited from portal masters PLEASE NOTE: System properties with prefix ASP.* are not inherited in portal clients

def is_equal(x, y): (source)

Compare the two objects x and y for equality.

Returns
BoolUndocumented
def isManagementInterface(self): (source)

Returns true if current context is management-interface, false else.

Returns
BoolUndocumented
def isPreviewRequest(REQUEST): (source)

Returns true if current context is preview-request, false else.

Returns
BoolUndocumented
def localfs_read(filename, mode='b', cache='public, max-age=3600', REQUEST=None): (source)

Reads file from local file-system. You must grant permissions for reading from local file-system to directories in Config-Tab / Miscelleaneous-Section.

Parameters
filename:stringFilepath
mode:string, values are 'b' - binary @param cache Cache-Headers @type cache boolAccess mode
cacheUndocumented
REQUEST:ZPublisher.HTTPRequestthe triggering request
Returns
string or filestream_iteratorContents of file
def localfs_readPath(filename, data=False, recursive=False, REQUEST=None): (source)

Reads path from local file-system.

Returns
listUndocumented
def localfs_remove(path, deep=0): (source)

Removes file from local file-system.

def localfs_write(filename, v, mode='b'): (source)

Writes value to file to local file-system.

Parameters
filename:strthe filename.
vUndocumented
mode:strthe mode (b=binary).
def nvl(a1, a2, n=None): (source)

Returns its first argument if it is not equal to third argument (None), otherwise it returns its second argument.

Parameters
a1:any1st argument
a2:any2nd argument
nUndocumented
Returns
anyUndocumented
def once(key, request): (source)

once per request

Parameters
keythe key
requestthe request
Returns
booleanBoolean execute once
def operator_contains(c, v, ignorecase=False): (source)

Check if collection contains value.

Parameters
c:list|set|tupleCollection
v:anyValue
ignorecase:BoolIgnore Case-Sensitivity
Returns
BoolCollection contains value
def operator_delattr(a, b): (source)

Delete key from python-object.

Parameters
a:anyObject
b:anyKey
def operator_delitem(a, b): (source)

Delete key from python-dictionary.

Parameters
a:dictDictionary
b:anyKey
def operator_getattr(a, b, c=None): (source)

Retrieves value for key from python-object. This is a convenience-function since the use expressions like getattr(a,b,c) is restricted in DTML.

Parameters
a:anyObject
b:anyKey
c:anyDefault-Value
Returns
anyUndocumented
def operator_getitem(a, b, c=None, ignorecase=True): (source)

Retrieves value for key from python-dictionary.

Parameters
a:dictDictionary
b:anyKey
c:anyDefault-Value
ignorecase:BoolIgnore Case-Sensitivity
Returns
anyUndocumented
def operator_gettype(v): (source)

Returns python-type of given value.

Parameters
v:anyValue
Returns
typethe type of the value
def operator_itemgetter(key, val, dictionary): (source)

Undocumented

def operator_setattr(a, b, c): (source)

Applies value for key to python-object. This is a convenience-function since the use expressions like setattr(a,b,c) is restricted in DTML.

Parameters
a:anyObject
b:stringKey
c:anyValue
Returns
objectUndocumented
def operator_setitem(a, b, c): (source)

Applies value for key in python-dictionary. This is a convenience-function since it is not possible to use expressions like a[b]=c in DTML.

Parameters
a:dictDictionary
b:anyKey
c:anyValue
Returns
dictUndocumented
def parse_json(*args, **kwargs): (source)

Returns an object representation of the json-string.

Returns
dict|list|int|etc.Undocumented
def parseLangFmtDate(s): (source)

Parses a string representing a date by trying a variety of different parsers. The parse will try each parse pattern in turn. A parse is only deemed successful if it parses the whole of the input string. If no parse patterns match, None is returned.

Parameters
s:sthe date to parse
Returns
struct_timethe parsed date.
def parseXmlString(xml): (source)

Parse value from ZMS XML-Structure.

Parameters
xml:str or io.BytesIOxml data
Returns
anylist or dict
def processData(context, processId, data, trans=None): (source)

Process data with custom transformation.

Parameters
context:ZMSObjectZMS context
processId:strthe process-id
data:str or io.BytesIOthe xml-data
trans:strthe transformation
Returns
strthe transformed data
def pybool(v): (source)

Undocumented

def pystr(v, encoding='utf-8', errors='strict'): (source)

Undocumented

def qs_append(qs, p, v): (source)

Append to query-string.

def raiseError(error_type, error_value): (source)

Raise error

Parameters
error_type:strthe zExcpetions error-type
error_value:strthe error-value as string
Returns
zExceptions.Errorthe error
def rand_int(n): (source)

Random integer in given range.

Parameters
n:intRange
Returns
intRandom integer
def re_findall(pattern, text, ignorecase=False): (source)

Return all non-overlapping matches of pattern in string, as a list of strings. The string is scanned left-to-right, and matches are returned in the order found. If one or more groups are present in the pattern, return a list of groups; this will be a list of tuples if the pattern has more than one group. Empty matches are included in the result unless they touch the beginning of another match convenience-function since re cannot be imported in restricted python

Parameters
pattern:raw strthe regular expression to which this string is to be matched
textUndocumented
ignorecaseUndocumented
Returns
strUndocumented
def re_search(pattern, subject, ignorecase=False): (source)

Scan through string looking for a location where the regular expression pattern produces a match, and return a corresponding MatchObject instance. Return None if no position in the string matches the pattern; note that this is different from finding a zero-length match at some point in the string. convenience-function since re cannot be imported in restricted python

Parameters
pattern:raw strthe regular expression to which this string is to be matched
subjectUndocumented
ignorecaseUndocumented
Returns
strUndocumented
def re_sub(pattern, replacement, subject, ignorecase=False): (source)

Performs a search-and-replace across subject, replacing all matches of regex in subject with replacement. The result is returned by the sub() function. The subject string you pass is not modified. Convenience-function since re cannot be imported in restricted python.

Parameters
pattern:raw strthe regular expression to which this string is to be matched
replacement:strthe string to be substituted for each match
subject:strthe string in which the replacement has to be done
ignorecase:Bool=Falseignore case considerations
Returns
strthe resulting string.
def remove_tags(s): (source)

Undocumented

def scalar(o): (source)

Undocumented

def sendMail(context, mto, msubject, mbody, REQUEST=None, mattach=None): (source)

Sends Mail via MailHost.

Parameters
context:ZMSObjectthe context
mto:strthe recipient(s)
msubjectthe subject
mbody:str or dictthe body
REQUESTUndocumented
mattachUndocumented
Returns
BoolUndocumented
def set_response_headers(fn, mt='application/octet-stream', size=None, request=None): (source)

Set content-type and -disposition to response-headers.

def set_response_headers_cache(context, request=None, cache_max_age=24 * 3600, cache_s_maxage=-1): (source)

Set default and dynamic cache response headers according to ZMS_CACHE_EXPIRE_DATETIME which is determined in ObjAttrs.isActive for each page element as the earliest time for invalidation.

Usage: Add to standard_html master template, e.g.:

  <tal:block tal:define="
    standard modules/Products.zms/standard;
    cache_expire python:standard.set_response_headers_cache(this, request, cache_max_age=0, cache_s_maxage=6*3600)">
  </tal:block>
Parameters
contextUndocumented
requestUndocumented
cache_max_ageseconds the element remains in all caches (public/proxy and private/browser)
cache_s_maxageseconds the element remains in public/proxy cache (value -1 means cache_s_maxage = cache_max_age)
Returns
tupleTuple of expires date time in GMT as ISO8601 string and the seconds until expiration
def set_session_value(context, key, value): (source)

Set http-session-value.

def sort_item(i): (source)

Undocumented

def sort_list(l, qorder=None, qorderdir='asc', ignorecase=1): (source)

Sorts list by given field.

Returns
listSorted list.
def str_item(i, f=False): (source)

Returns a string representation of the item.

Returns
strUndocumented
def str_json(i, encoding='ascii', errors='xmlcharrefreplace', formatted=False, level=0, allow_booleans=True, sort_keys=True): (source)

Returns a json-string representation of the object.

Returns
strUndocumented
def string_list(s, sep='\n', trim=True): (source)

Split string by given separator and trim items.

Returns
listUndocumented
def string_maxlen(s, maxlen=20, etc='...', encoding=None): (source)

Returns string with specified maximum-length. If original string exceeds maximum-length '...' is appended at the end.

Parameters
s:strString
maxlen:intMaximum-length
etc:strCharacters to be appended if maximum-length is exceeded
encoding:strEncoding
Returns
strUndocumented
def stripDateTime(t): (source)

Strips time portion from date-time and returns date.

Parameters
t:DateTime.DateTime|tuple|time.struct_timethe date-time
Returns
time.struct_timethe pythonic-time
def sync_list(l, nl, i): (source)

Synchronizes list l with new list nl using the column i as identifier.

def todayInRange(start, end): (source)

Checks if today is in given range.

Parameters
start:anystart date
end:anyend date
def toXmlString(context, v, xhtml=False, encoding='utf-8'): (source)

Serializes value to ZMS XML-Structure.

Parameters
context:zmsobject.ZMSObjectZMS context
v:zmsobject.ZMSObjectcontent node
xhtml@type xhtml @param encoding @type encoding
encodingUndocumented
Returns
stringUndocumented
def triggerEvent(context, *args, **kwargs): (source)

Hook for trigger of custom event (if there is one)

def umlaut_quote(s, mapping={}): (source)

Replace umlauts in s using given mapping.

Parameters
s:strString
mapping:dictMapping
Returns
strQuoted string
def unencode(p, enc='utf-8'): (source)

Unencodes given parameter.

def unescape(s): (source)

Unescape

Returns
strUndocumented
def url_append_params(url, dict, sep='&'): (source)

Append params from dict to given url.

Parameters
url:strUrl
dict:dictdictionary of params (key/value pairs)
sepUndocumented
Returns
strNew url
def url_encode(url): (source)

All unsafe characters must always be encoded within a URL.

Parameters
url:strUrl
Returns
strEncoded string
See Also
http://www.ietf.org/rfc/rfc1738.txt
def url_inherit_params(url, REQUEST, exclude=[], sep='&amp;'): (source)

Inerits params from request to given url.

Parameters
url:strUrl
REQUEST:ZPublisher.HTTPRequestthe triggering request
excludeUndocumented
sepUndocumented
Returns
strNew url
def url_quote(string, safe='/', encoding=None, errors=None): (source)

Undocumented

def writeBlock(context, info): (source)

Log information.

Parameters
contextUndocumented
info:anyInformation
Returns
strUndocumented
def writeError(context, info): (source)

Log error.

Parameters
contextUndocumented
info:anyInformation
Returns
strUndocumented
def writeLog(context, info): (source)

Log debug-information.

Parameters
contextUndocumented
info:anyDebug-information
Returns
strUndocumented
def writeStdout(context, info): (source)

Write to standard-out (only allowed for development-purposes!).

Parameters
contextUndocumented
info:anyObject
Returns
strUndocumented
def zmi_paths(context): (source)

Undocumented

security = (source)

Undocumented

umlaut_map: dict[str, str] = (source)

Undocumented