def get_mem_info():
 if (not sys.platform.startswith('linux')):
  raise RuntimeError('Memory information implemented only for Linux')
 info = {}
 with open('/proc/meminfo', 'r') as f:
  for line in f:
   p = line.split()
   info[p[0].strip(':').lower()] = (float(p[1]) * 1000.0)
 return info

def get_mem_info ( ) : if ( not sys . platform . startswith ( 'linux' ) ) : raise RuntimeError ( 'Memory information implemented only for Linux' ) info = { } with open ( '/proc/meminfo' , 'r' ) as f : for line in f : p = line . split ( ) info [ p [ 0 ] . strip ( ':' ) . lower ( ) ] = ( float ( p [ 1 ] ) * 1000.0 ) return info
get information about available memory .