def MemValues():
 for line in open('/proc/meminfo').readlines():
  if line.startswith('MemTotal:'):
   memTotal = line.split()[1]
  if line.startswith('MemFree:'):
   memFree = line.split()[1]
  if line.startswith('Cached:'):
   memCached = line.split()[1]
 return (memTotal, memCached, memFree)

def MemValues ( ) : for line in open ( '/proc/meminfo' ) . readlines ( ) : if line . startswith ( 'MemTotal:' ) : memTotal = line . split ( ) [ 1 ] if line . startswith ( 'MemFree:' ) : memFree = line . split ( ) [ 1 ] if line . startswith ( 'Cached:' ) : memCached = line . split ( ) [ 1 ] return ( memTotal , memCached , memFree )
read total mem .