Esempio n. 1
0
 def setup(self):
     try:
         self.objects = read_and_analyse(file_name)
         self.worlds = []
         for obj in self.objects.values():
             if obj.has_parent("world") and obj.id != "world":
                 self.worlds.append(obj)
                 print obj
         print len(self.objects), "objects loaded in", len(self.worlds), "worlds"
     except IOError:
         print "no %s, starting empty" % file_name
         print 'do "python2 gen_simple_core.py" to generate example meadow file'
         print "or get it from http://purple.worldforge.org/~aloril/atlas/simple_core.atlas"
         self.objects = {}
     self.save_no = 0
     self.save()
     self.log = File(log_file_name, "w")
Esempio n. 2
0
 def setup(self):
     try:
         self.objects = read_and_analyse(file_name)
         self.worlds = []
         for obj in self.objects.values():
             if obj.has_parent("world") and obj.id!="world":
                 self.worlds.append(obj)
                 print obj
         print len(self.objects), "objects loaded in", len(self.worlds), "worlds"
     except IOError:
         print "no %s, starting empty" % file_name
         print 'do "python2 gen_simple_core.py" to generate example meadow file'
         print "or get it from http://purple.worldforge.org/~aloril/atlas/simple_core.atlas"
         self.objects = {}
     self.save_no = 0
     self.save()
     self.log = File(log_file_name, "w")
Esempio n. 3
0
 def setup(self):
     #self.objects = read_and_analyse("media.bach")
     self.objects = read_and_analyse("simple_core.atlas")
     print len(self.objects), "objects loaded"
Esempio n. 4
0
 def setup(self):
     #self.objects = read_and_analyse("media.bach")
     self.objects = read_and_analyse("simple_core.atlas")
     print len(self.objects), "objects loaded"