def sysctl_kernel(key, value=None):
 if (value is not None):
  utils.write_one_line(('/proc/sys/kernel/%s' % key), str(value))
 else:
  out = utils.read_one_line(('/proc/sys/kernel/%s' % key))
  return int(re.search('\\d+', out).group(0))

def sysctl_kernel ( key , value = None ) : if ( value is not None ) : utils . write_one_line ( ( '/proc/sys/kernel/%s' % key ) , str ( value ) ) else : out = utils . read_one_line ( ( '/proc/sys/kernel/%s' % key ) ) return int ( re . search ( '\\d+' , out ) . group ( 0 ) )
partial implementation of sysctl .