Ejemplo n.º 1
0
 def pull_boss_keyword(self):
     with open('..//levels//turnbullacs.xml') as fin:
         xml_file = fin.read()
     success, boss = GM.obj_wrapper(xml_file)
     if success:
         return boss.spot[0].keyword[0].value
     else:
         print "Failure pull boss keyword."
Ejemplo n.º 2
0
 def get_location_text(self):
     with open('..//levels//turnbullacs.xml') as fin:
         xml_file = fin.read()
     success_gang, gang = GM.obj_wrapper(xml_file)
     if success_gang:
         print 'done'
         loc = self.get_location()
         if int(gang.spot[int(loc)].intro[0].attrs['location']) == int(self.get_location()):
             print "found match"
             return gang.spot[int(loc)].intro[0].value
         else:
             print "work on syntax for location text"
     else:
         print "Failure at get location text."