示例#1
0
 def activate(self):
   # find out all (in database) and strip active ones:
   pns=[]
   for x in parted.getNames():
     act=0
     for ax in self.actparts:
       if x==ax.name:act=1; break
     if act==0: pns.append(x)
   if len(pns)>0:
     print 'pns:',pns,'appending:',pns[0]
     self.actparts.append(parted.TrgPartition(pns[0]))
     self.actparts[-1].show(self.frparts)
   else:
     print 'empty pns, nothing activated'