Example #1
0
File: sdf9.py Project: ja996879/ddd
 def gping(self):
     i = 1
     j = 0
     k = []
     q = 0
     a = 0
     s = linkDb()
     ka = s.sping()
     for x in ka:
         response = os.system("ping %s" % (x))
         if response == 0:
             outText = Label(self)
             outText["text"] = ("%s is on " % (x))
             outText.grid(row=i, column=j)
             j += 1
             print(j)
             if j == 2:
                 j = 0
                 i += 1
         else:
             k.append(x)
     for p in k:
         outText2 = Label(self)
         outText2["text"] = ("%s is down " % (p))
         outText2.grid(row=i + 1 + a, column=q)
         q += 1
         if q == 2:
             q = 0
             a += 1
Example #2
0
File: sdf9.py Project: ja996879/ddd
 def gping(self):
     i=1
     j=0
     k=[]
     q=0
     a=0
     s=linkDb()
     ka=s.sping()
     for x in ka:
      response=os.system("ping %s" %(x))
      if response ==0:
        outText = Label(self)
        outText["text"]=("%s is on " %(x))
        outText.grid(row=i, column=j)
        j+=1
        print(j)
        if j==2:
            j=0
            i+=1
      else:
          k.append(x)
     for p in k:
       outText2 = Label(self)
       outText2["text"]=("%s is down " %(p))
       outText2.grid(row=i+1+a, column=q)
       q+=1
       if q==2:
            q=0
            a+=1
Example #3
0
File: sdf9.py Project: ja996879/ddd
 def saveDb(self):
     d = linkDb()
     d.li()
Example #4
0
File: sdf9.py Project: ja996879/ddd
 def saveDb(self):  
     d=linkDb()
     d.li()