def PiVersion():
 with open('/proc/cpuinfo', 'r') as f:
  cpu_count = sum([1 for x in f.readlines() if x.startswith('processor')])
 if (cpu_count == 1):
  return 'PiB'
 else:
  return 'Pi2'

def PiVersion ( ) : with open ( '/proc/cpuinfo' , 'r' ) as f : cpu_count = sum ( [ 1 for x in f . readlines ( ) if x . startswith ( 'processor' ) ] ) if ( cpu_count == 1 ) : return 'PiB' else : return 'Pi2'
determines the version of pi currently being used .