Esempio n. 1
0
 def initialize(self, **args):
     if not args.has_key('tag'):
         tag = cls.tag
     if xmlfile_support:
         XmlFile.__init__(self, tag = tag) 
     for base in cls.autoxml_bases:
         base.__init__(self)
     #super(cls, self).__init__(tag = tag) cooperative shit disabled for now
     for init in inits:#self.__class__.initializers:
         init(self)
     for x in args.iterkeys():
         setattr(self, x, args[x])
     # init hook
     if hasattr(self, 'init'):
         self.init(tag)
Esempio n. 2
0
 def initialize(self, uri=None, keepDoc=False, tmpDir='/tmp', **args):
     if xmlfile_support:
         if args.has_key('tag'):
             XmlFile.__init__(self, tag=args['tag'])
         else:
             XmlFile.__init__(self, tag=cls.tag)
     for base in cls.autoxml_bases:
         base.__init__(self)
     #super(cls, self).__init__(tag = tag) cooperative shit disabled for now
     for init in inits:  #self.__class__.initializers:
         init(self)
     for x in args.iterkeys():
         setattr(self, x, args[x])
     # init hook
     if hasattr(self, 'init'):
         self.init(tag)
     if xmlfile_support and uri:
         self.read(uri, keepDoc, tmpDir)
Esempio n. 3
0
 def initialize(self, uri = None, keepDoc = False, tmpDir = '/tmp',
                **args):
     if xmlfile_support:
         if args.has_key('tag'):
             XmlFile.__init__(self, tag = args['tag'])
         else:
             XmlFile.__init__(self, tag = cls.tag)
     for base in cls.autoxml_bases:
         base.__init__(self)
     for init in inits:
         init(self)
     for x in args.iterkeys():
         setattr(self, x, args[x])
     # init hook
     if hasattr(self, 'init'):
         self.init(tag)
     if xmlfile_support and uri:
         self.read(uri, keepDoc, tmpDir)
Esempio n. 4
0
 def initialize(self, **args):
     if xmlfile_support:
         # totally dailywtf
         # if args.has_key('tag'):
         #    tag = args['tag']
         # else:
         #    tag = self.__class__.tag # ought to be autoxml
         # XmlFile.__init__(self, tag = tag)
         if not args.has_key("tag"):
             XmlFile.__init__(self, tag=cls.tag)
     for base in cls.autoxml_bases:
         base.__init__(self)
     # super(cls, self).__init__(tag = tag) cooperative shit disabled for now
     for init in inits:  # self.__class__.initializers:
         init(self)
     for x in args.iterkeys():
         setattr(self, x, args[x])
     # init hook
     if hasattr(self, "init"):
         self.init(tag)