Utility functions, constants, internals, etc.
|
property_RO(method)
Decorator for Read_Only class/instance property. |
|
|
|
bytes2repr(bytestr)
Represent bytes or str as
b"..." . |
|
|
|
bytes2str(bytestr,
dflt=missing,
name='')
Convert bytes /unicode to str
if needed. |
|
|
iterator
|
iterbytes(collection)
iter(callable, sentinel) -> iterator |
|
|
|
str2bytes(strbytes,
dflt=missing,
name='')
Convert strbytes to
bytes /unicode if needed. |
|
|
|
aspect_ratio(width,
*height,
**Error_kwds)
Compute the smallest, integer aspect ratio. |
|
|
|
clipstr(bytestr,
limit=50)
Clip a string to the given length limit. |
|
|
|
errorf(fmtxt,
*args,
**file_flush_nl_nt_argv0)
like printf(fmtxt, *args, ...,
file=sys.stderr) . |
|
|
|
flint(f)
Return int for integer float . |
|
|
|
gcd(a,
b)
Calculate the Greatest Common Divisor of a and b. |
|
|
|
inst2strepr(inst,
strepr,
*attrs)
Convert an instance's attributes, maintaining the order. |
|
|
|
isinstanceOf(inst,
*classes,
**name_missing)
Check a Python instance' class. |
|
|
|
|
|
lambda1(arg)
Inlieu of using lambda arg: arg. |
|
|
|
logf(fmtxt,
*args,
**file_flush_nl_nt_argv0)
Formatted log fmtxt % args with optional keywords. |
|
|
|
machine()
Return the platform.machine string, distinguishing Intel
from emulating Intel on Apple Silicon (on macOS). |
|
|
|
name2objc(name_)
Convert a (selector) name to bytes and ObjC naming
rules. |
|
|
|
name2py(name_)
Convert a (selector) name str and Python naming
conventions. |
|
|
|
name2pymethod(name_)
Convert a (selector) name to a valid Python callback method. |
|
|
|
printf(fmtxt,
*args,
**file_flush_nl_nt_argv0)
Formatted print fmt % args with optional keywords. |
|
|
|
|
|
property2(inst,
name)
Return the property get and set method. |
|
|
|
sortuples(iterable)
Sort tuples alphabetically, case-insensitive. |
|
|
|
terminating(app,
timeout=None)
Set up a separate thread to terminate an NSApplication by calling the
.terminate_ method after the given timeout has elapsed. |
|
|
|
type2strepr(inst,
strepr=<type 'str'>,
**kwds)
Represent a Python Type instance as str or
repr . |
|
|
|
z1000str(size,
sep='_')
Convert a size to string with 1_000's seperator. |
|
|
|
zfstr(flt,
prec=3)
Format a float and strip trailing zero decimals. |
|
|
|
zSIstr(size,
B=' B ' ,
K=1024)
Convert a size to string with SI-units suffix. |
|
|