(INTERNAL) Utility functions, constants, etc.
|
gcd(a,
b)
Calculate the Greatest Common Divisor of a and b. |
|
|
|
aspect_ratio(width,
height)
Compute the smallest, int aspect ratio. |
|
|
|
bytes2repr(bytestr)
Represent bytes like repr(bytestr) . |
|
|
|
bytes2str(bytestr,
dflt=missing())
Convert bytes/unicode to str if needed. |
|
|
iterator
|
iterbytes(collection)
iter(callable, sentinel) -> iterator |
|
|
|
str2bytes(bytestr,
dflt=missing())
Convert str to bytes/unicode if needed. |
|
|
|
clip(bytestr,
limit=50)
Clip a string or bytes to the given length limit. |
|
|
|
flint(f)
Return int for integer float . |
|
|
|
inst2strepr(inst,
strepr,
*attrs)
Convert an instance's attributes, maintaining the order. |
|
|
|
isinstanceOf(inst,
*classes,
**name_missing)
Check a Python object's class. |
|
|
|
printf(fmt,
*args,
**kwds)
Formatted print fmt % args with optional keywords. |
|
|
|
type2strepr(inst,
strepr=<type 'str'>)
Return a Python Type instance as str or
repr . |
|
|
|
z1000str(size,
sep=' _ ' )
Convert a size value to string with 1_000's seperator. |
|
|
|
zSIstr(size,
B=' B ' )
Convert a size value to string with SI-units. |
|
|