_images/botd2line.png

ob

python3 object library

exceptions

NoBot
NoFile
NoModule
NoType
NotImplemented
Restart
Stop

classes

Bus(*args, **kwargs)
Cfg(*args, **kwargs)
Command()
Db(*args, **kwargs)
Default(*args, **kwargs)
Dispatcher()
Event()
Getter(txt)
Handler()
Kernel()
List(*args, **kwargs)
Loop()
O()
Obj(*args, **kwargs)
Object(*args, **kwargs)
Option(txt)
Output()
Repeater(sleep, func, *args[, name])
Setter(txt)
Skip(txt)
Thr(func, *args[, thrname, daemon])
Timer(sleep, func, *args[, name])
Token(txt)
Url(txt)

functions

cdir(path)
day()
elapsed(seconds[, short])
fmt(o[, keys, empty, skip])
fns(name[, timed])
fntime(daystr)
getname(o)
gettype(o)
hook(hfn)
kernel()
launch(func, *args, **kwargs)
listfiles(wd)
parse_txt(o[, ptxt])
parse_ymd(daystr)
spl(txt)

source

exception NotImplemented[source]

Bases: Exception

exception Restart[source]

Bases: Exception

exception Stop[source]

Bases: Exception

exception NoBot[source]

Bases: Exception

exception NoFile[source]

Bases: Exception

exception NoModule[source]

Bases: Exception

exception NoType[source]

Bases: Exception

cdir(path)[source]
gettype(o)[source]
kernel()[source]
class O[source]

Bases: object

class Obj(*args, **kwargs)[source]

Bases: ob.O

delkeys(keys=[])[source]
edit(setter, skip=True, skiplist=[])[source]
get(key, default=None)[source]
keys()[source]
items()[source]
last()[source]
merge(d)[source]
overlay(d, keys=None, skip=None)[source]
register(key, value)[source]
search(s)[source]
set(key, value)[source]
update(data)[source]
values()[source]
class Object(*args, **kwargs)[source]

Bases: ob.Obj

json()[source]
load(opath)[source]
save(tab=False)[source]
class Default(*args, **kwargs)[source]

Bases: ob.Object

default = ''
class Cfg(*args, **kwargs)[source]

Bases: ob.Default

class List(*args, **kwargs)[source]

Bases: ob.Object

append(key, value)[source]
update(d)[source]
class Timer(sleep, func, *args, name=None)[source]

Bases: ob.Object

run()[source]
start()[source]
stop()[source]
class Repeater(sleep, func, *args, name=None)[source]

Bases: ob.Timer

run()[source]
class Db(*args, **kwargs)[source]

Bases: ob.Object

all(otype, selector=None, index=None, timed=None)[source]
deleted(otype)[source]
every(selector=None, index=None, timed=None)[source]
find(otype, selector=None, index=None, timed=None)[source]
findname(name, selector=None, index=None, timed=None)[source]
lastmatch(otype, selector=None, index=None, timed=None)[source]
lasttype(otype)[source]
lastfn(otype)[source]
class Thr(func, *args, thrname='', daemon=True)[source]

Bases: threading.Thread

join(timeout=None)[source]
run()[source]
class Token(txt)[source]

Bases: ob.Object

class Option(txt)[source]

Bases: ob.Default

class Getter(txt)[source]

Bases: ob.Object

class Setter(txt)[source]

Bases: ob.Object

class Skip(txt)[source]

Bases: ob.Object

class Url(txt)[source]

Bases: ob.Object

class Bus(*args, **kwargs)[source]

Bases: ob.Object

objs = []
static add(obj)[source]
static announce(txt)[source]
static byorig(orig)[source]
static byfd(fd)[source]
static bytype(typ)[source]
first()[source]
static resume()[source]
static say(orig, channel, txt)[source]
class Dispatcher[source]

Bases: ob.Object

dispatch(event)[source]
register(name, callback)[source]
class Output[source]

Bases: ob.Object

static append(channel, txtlist)[source]
dosay(channel, txt)[source]
oput(channel, txt)[source]
output()[source]
static size(name)[source]
start()[source]
stop()[source]
class Event[source]

Bases: ob.Default

bot()[source]
parse()[source]
ready()[source]
reply(txt)[source]
say(txt)[source]
show()[source]
wait(timeout=1.0)[source]
class Command[source]

Bases: ob.Event

class Loop[source]

Bases: ob.Object

do(e)[source]
error(e)[source]
loop()[source]
put(e)[source]
restart()[source]
start()[source]
stop()[source]
class Handler[source]

Bases: ob.Dispatcher, ob.Loop

cmd(txt)[source]
event(txt)[source]
handle(e)[source]
loop()[source]
poll()[source]
raw(txt)[source]
say(channel, txt)[source]
start()[source]
class Kernel[source]

Bases: ob.Dispatcher, ob.Loop

add(func)[source]
boot(wd='')[source]
cmd(clt, txt)[source]
do(e)[source]
error(e)[source]
handle(hdl, obj)[source]
init(mns)[source]
introspect(mod)[source]
opts(ops)[source]
parse_cli(name='')[source]
static privileges(name=None)[source]
static root()[source]
scan(pkgs='')[source]
static wait()[source]
day()[source]
elapsed(seconds, short=True)[source]
fmt(o, keys=None, empty=True, skip=None)[source]
fns(name, timed=None)[source]
fntime(daystr)[source]
getname(o)[source]
hook(hfn)[source]
launch(func, *args, **kwargs)[source]
spl(txt)[source]
listfiles(wd)[source]
parse_txt(o, ptxt=None)[source]
parse_ymd(daystr)[source]