Пример #1
0
 def __parseRouters__(self, britefile):
     line = britefile.readline()
     indexFinal = line.find(')')
     nRouters = line[:indexFinal]
     nRouters = int(nRouters)
     count = 1
     while count <= nRouters:
         britefile.readline()
         router = Router()
         router.id = count
         self.routers.append( router )
         count += 1
Пример #2
0
 def __parseRouters__(self, britefile):
     line = britefile.readline()
     indexFinal = line.find(')')
     nRouters = line[:indexFinal]
     nRouters = int(nRouters)
     count = 0
     while count < nRouters:
         line = britefile.readline()
         router = Router()
         index = line.find('\t')
         routerid = (count+1) - self.delta_id
         router.id = routerid + self.delta_id
         self.routers.append( router )
         count += 1