rext.utils module

utils package.

a_time(daystr)[source]
aj(sep=None, *args)[source]
b_time(obj)[source]
check_permissions(ddir, dirmask=448, filemask=384)[source]
day()[source]
decode_char(txt, encoding='utf-8', what='')[source]
dispatch(target, event, cmnd, *args, **kwargs)[source]
dj(*args)[source]
do_sed(filename, sedstring)[source]

replace oldbot strings with the new one.

do_url(type, url, myheaders={}, postdata={}, keyfile=None, certfile='', port=80)[source]
dtime(stamp)[source]
enc_char(s)[source]
enc_name(input)[source]
enc_needed(s)[source]
error(*args, **kwargs)[source]
feed(text)[source]
format(*args, **kwargs)[source]
from_enc(txt, encoding='utf-8', what='')[source]
get_clsname(obj)[source]
get_encoding(data)[source]
get_exception(*args, **kwargs)[source]
get_frame(search='code')[source]
get_func(*args, **kwargs)[source]
get_funcname(func)[source]
get_highest(target, file_name)[source]

determine new file extension.

get_how(*args, **kwargs)[source]
get_name(obj)[source]
get_plugname(*args, **kwargs)[source]
get_source(mod, package)[source]
get_status(target)[source]
get_strace(*args, **kwargs)[source]
get_urls(data)[source]
hello(name='')[source]
hms()[source]
intersect(a, b)[source]
class istr[source]

Bases: builtins.str

j(*args)[source]
list_eggs(filter='')[source]
list_files(*args, **kwargs)[source]
loop(*args, **kwargs)[source]
make_dir(path)[source]
make_opts(options)[source]
make_signature(data)[source]
make_time(daystr)[source]
make_version(name='')[source]
mj(*args)[source]
need_redirect(resp)[source]
need_skip(obj, black=, []white=[])[source]
nr_days(seconds)[source]
parse(txt)[source]
parse_email(fn)[source]
parse_url(*args, **kwargs)[source]

Attribute Index Value Value if not present scheme 0 URL scheme specifier empty string netloc 1 Network location part empty string path 2 Hierarchical path empty string query 3 Query component empty string fragment 4 Fragment identifier empty string

parse_urls(*args, **kwargs)[source]
ptime(daystr)[source]
reduced_keys(*args, **kwargs)[source]
resolve(*args, **kwargs)[source]
resolve_host(ip=None, timeout=1.0)[source]
resolve_ip(hostname=None, timeout=1.0)[source]
rtime()[source]
short_date(*args, **kwargs)[source]
show_eggs(filter='rext')[source]
smooth(a)[source]
split_txt(what, l=375)[source]
str_day(seconds)[source]
strip_html(text)[source]
strip_wiki(text)[source]
stripbadchar(s)[source]
stripped(input)[source]
strtotime(what)[source]

convert string to time.

tdiff(d1, d2)[source]
time_stamp(*args, **kwargs)[source]
time_string(*args, **kwargs)[source]
time_time(*args, **kwargs)[source]
to_enc(what, encoding='utf-8')[source]
today()[source]

return time of 0:00 today.

touch(fname)[source]
txt_parse(txt)[source]
unescape(text)[source]
union(a, b)[source]
unique(a)[source]
useragent()[source]
verify_signature(data, signature)[source]