def set_file(self, name): if name is None: return None if self.get_file(name) is not None: self.error("File '%s' already exists!" % name) return None evt = event.file(name=name) id = evt.id() self.__files[name] = id self.send_evt(evt) return id
def __init__(self, parent, handle): BeahEventObject.__init__(self, parent) self.offset = 0 self.handle = handle self.the_event(event.file(name=handle))