def dumpAccessPointsList(self, outfile='ssids.log'): if len(self.AccessPointsList) < 1: return sf = open( self.logDir() + outfile , "wb" ) # first dump OPEN networks for ap in self.AccessPointsList: if not ap.isProtected(): sf.write( str(ap.getBSSID()) + " -> " +$ sf.close() # now protected networks for ap in self.AccessPointsList: if ap.isProtected(): sf.write( str(ap.getBSSID()) + " -> " +$ sf.close() sf.close() return