def writefile(filename, buf, callback=None, errback=None): f = open(filename, 'wb', size=len(buf)) _async.submit_write_io(f, buf, callback, errback) f.close()
def write(obj, buf, callback=None, errback=None): _async.submit_write_io(obj, buf, callback, errback)