else :
self.info = None, 0, 0, None, None, None, None
+ def __str__ ( self ) :
+ output = map( str , self.info )
+ return " ".join( output )
+
def report ( self ) :
return "%d gps" % self.ngps
def write_logs ( self ) :
fd = open( os.path.join( self.homedir , "wiscan_gui.info" ) , 'a' )
- fd.write( "%s %s %s\n" % ( self.tstamp , " ".join(self.info) , " ".join(self.scanlist) ) )
+ fd.write( "%s %s\n" % ( self.tstamp , self ) )
fd.close()
if self.satellites :
loclist = open( os.path.join( self.homedir , "location.info" ) , 'a' )
celllist.write ( "%s\n" % ( self.cells ,) )
celllist.close()
+ def __str__ ( self ) :
+ return "%s %s" % ( gps.GPSObject.__str__(self) , wifiscan.WifiScanner.__str__(self) )
+
def report ( self ) :
# BUG : if report is called after close, db.nrows() will produce an exception
return "%s\t%s\t%d ap\t%d total ap" % ( gps.GPSObject.report(self) , wifiscan.WifiScanner.report(self) , self.newap , self.db.nrows() )
except Exception , ex :
osso.SystemNote(self.osso_context).system_note_infoprint("Exception scanning %s" % ex )
+ def __str__ ( self ) :
+ output = map( lambda x : "%s %s" % x , self.scanlist.iteritems() )
+ return " ".join( output )
+
def report ( self ) :
return "%d scan\t%d fp" % ( self.nscan , self.nfp )