def vm_stat(field):
 out = sh('vm_stat')
 for line in out.split('\n'):
  if (field in line):
   break
 else:
  raise ValueError('line not found')
 return (int(re.search('\\d+', line).group(0)) * PAGESIZE)

def vm_stat ( field ) : out = sh ( 'vm_stat' ) for line in out . split ( '\n' ) : if ( field in line ) : break else : raise ValueError ( 'line not found' ) return ( int ( re . search ( '\\d+' , line ) . group ( 0 ) ) * PAGESIZE )
wrapper around vm_stat cmdline utility .