3 def login(useauthless = True, **kw):
7 loginasync(mycb, useauthless, **kw)
8 while result[0] is None:
12 def mustconnect(host, port = -1):
16 if resp is not None and resp.getcmd() == u".connect":
19 if resp.getcode() != 200:
20 raise RuntimeError, resp.intresp()[0][0]
22 def cnl(host, port = -1, useauthless = True, **kw):
23 mustconnect(host, port)
24 err, reason = login(useauthless, **kw)
26 raise RuntimeError, (err, reason)
37 def ecmda(code, *args):
39 if resp.getcode() != code:
40 raise ValueError, resp.getcode()