def __init__(self, mediatypes, **kwargs): """Constructor""" # speech_server is plucked out of here by the web interface self.mediatypes = mediatypes log.msg('stage dict media types: %s' % mediatypes) self.speech_server = SpeechDirectory() self.audio_server = AudioDirectory() # PQ & EB 17.9.07. #XXX circular reference - because it is handy. for x in mediatypes.values(): x.set_stages(self) Xml2Dict.__init__(self, **kwargs)
def __delitem__(self, key): """Deletes an item from XML dictionary and from the file system Won't work if f is a directory name not a file @param f file name""" self.deleteFile(self[key].file) return Xml2Dict.__delitem__(self, key)