MyFile
|
FileFromData(self,
data,
filename='')
Creates a new instance of a file from given data. |
|
|
MyImage
|
ImageFromData(self,
data,
filename='')
Creates a new instance of an image from given data. |
|
|
any
|
nvl(self,
a1,
a2,
n=None)
Returns its first argument if it is not equal to third argument
(None), otherwise it returns its second argument. |
|
|
int
|
boolint(self,
v)
Returns int (0/1) for Boolean Type new in Python 2.3. |
|
|
any
|
dt_html(self,
value,
REQUEST)
Execute given DTML-snippet. |
|
|
string
|
|
string
|
encrypt_ordtype(self,
s)
Encrypts given string with entities by random algorithm. |
|
|
int
|
rand_int(self,
n)
Random integer in given range. |
|
|
string
|
get_diff(self,
v1,
v2,
datatype='string')
Renders diff of two values in HTML. |
|
|
string
|
string_maxlen(self,
s,
maxlen=20,
etc='...',
encoding=None)
Returns string with specified maximum-length. |
|
|
|
|
string
|
http_import(self,
url,
method='GET',
auth=None,
parse_qs=0)
Send Http-Request and return Response-Body. |
|
|
|
url_append_params(self,
url,
dict) |
|
|
|
url_inherit_params(self,
url,
REQUEST,
exclude=[]) |
|
|
string
|
id_quote(self,
s)
Converts given string to identifier (removes special-characters and
replaces German umlauts). |
|
|
string
|
get_id_prefix(self,
s)
Returns prefix from identifier (which is the non-numeric part at the
beginning). |
|
|
|
js_quote(self,
text,
charset=None) |
|
|
|
isPreviewRequest(self,
REQUEST) |
|
|
string
|
|
string
|
getMimeTypeIconSrc(self,
mt)
Returns the absolute-url of an icon representing the specified
MIME-type. |
|
|
|
|
|
writeStdout(self,
info)
Write to standard-out (only allowed for development-purposes!). |
|
|
|
tree_parents(self,
l,
i='id',
r='idId',
v='',
deep=1,
reverse=1) |
|
|
|
|
MyImage
|
|
list
|
getZipArchive(self,
f)
Extract files from zip-archive and return list of extracted files. |
|
|
string
|
buildZipArchive(self,
files,
get_data=True)
Pack ZIP-Archive and return data. |
|
|
string
|
getXmlHeader(self,
encoding='utf-8')
Returns XML-Header (encoding=utf-8) |
|
|
string
|
toXmlString(self,
v,
xhtml=False,
encoding='utf-8')
Serializes value to ZMS XML-Structure. |
|
|
any
|
parseXmlString(self,
xml,
mediadbStorable=True)
Parse value from ZMS XML-Structure. |
|
|
|
xslProcess(self,
xsl,
xml)
Process xml with xsl transformation. |
|
|
|
processData(self,
processId,
data,
trans=None)
Process data with custom transformation. |
|
|
dict
|
xmlParse(self,
xml)
Parse arbitrary XML-Structure into dictionary. |
|
|
list
|
xmlNodeSet(self,
mNode,
sTagName='',
iDeep=0)
Retrieve node-set for given tag-name from dictionary of
XML-Node-Structure. |
|
|
|
getLangFmtDate(self,
t,
lang=None,
fmt_str='SHORTDATETIME_FMT') |
|
|
|
parseLangFmtDate(self,
s,
lang=None,
fmt_str=None,
recflag=None) |
|
|
|
compareDate(self,
t0,
t1,
accuracy_time=1) |
|
|
MyImage
|
|
MyImage
|
pil_img_crop(self,
img,
box)
Returns a rectangular region from the current image. |
|
|
string
|
|
|
localfs_tempfile(self)
Creates temp-folder on local file-system. |
|
|
string or filestream_iterator
|
localfs_read(self,
filename,
mode='b',
REQUEST=None)
Reads file from local file-system. |
|
|
|
localfs_write(self,
filename,
v,
mode='b')
Writes file to local file-system. |
|
|
|
localfs_remove(self,
path,
deep=0)
Removes file from local file-system. |
|
|
list
|
localfs_readPath(self,
filename,
data=False,
recursive=False)
Reads path from local file-system. |
|
|
|
localfs_command(self,
command)
Executes command in local file-system. |
|
|
|
writeLog(self,
info)
Log debug-information. |
|
|
|
|
list
|
|
list
|
|
list
|
concat_list(self,
l1,
l2)
Concatinates two lists (l1 + l2). |
|
|
dict
|
dict_list(self,
l)
Converts list to dictionary: key=l[x*2], value=l[x*2+1] |
|
|
list
|
distinct_list(self,
l,
i)
Returns distinct values of given field from list. |
|
|
list
|
sort_list(self,
l,
qorder,
qorderdir='asc',
ignorecase=1)
Sorts list by given field. |
|
|
list
|
string_list(self,
s,
sep='\n') |
|
|
|
tree_list(self,
l,
i='id',
r='idId',
v='',
deep=0) |
|
|
list
|
filter_list(self,
l,
i,
v,
o='%')
Filters list by given field. |
|
|
|
copy_list(self,
l)
Copies list l. |
|
|
|
sync_list(self,
l,
nl,
i)
Syncronizes list l with new list nl using the column i as identifier. |
|
|
|
aggregate_list(self,
l,
i)
Aggregates given field in list. |
|
|
type
|
|
dict
|
|
any
|
|
|
|
object
|
|
any
|
operator_getattr(self,
a,
b,
c=None)
Retrieves value for key from python-object. |
|
|
|
|
dict
|
|
dict
|
get_colormap(self)
Parses default-stylesheet and returns color-map. |
|
|
string
|
re_sub(self,
pattern,
replacement,
subject,
ignorecase=False)
Performs a search-and-replace across subject, replacing all matches
of regex in subject with replacement. |
|
|
|
re_search(self,
pattern,
subject,
ignorecase=False)
Scan through string looking for a location where the regular
expression pattern produces a match, and return a corresponding
MatchObject instance. |
|
|