def processes():
 finder = _getfinder()
 args = {}
 attrs = {}
 processnames = []
 processnumbers = []
 creators = []
 partitions = []
 used = []
 args['----'] = aetypes.ObjectSpecifier(want=aetypes.Type('prcs'), form='indx', seld=aetypes.Unknown('abso', 'all '), fr=None)
 (_reply, args, attrs) = finder.send('core', 'getd', args, attrs)
 if ('errn' in args):
  raise Error, aetools.decodeerror(args)
 p = []
 if ('----' in args):
  p = args['----']
  for proc in p:
   if hasattr(proc, 'seld'):
    processnames.append(proc.seld)
   elif hasattr(proc, 'type'):
    if (proc.type == 'psn '):
     processnumbers.append(proc.data)
 args = {}
 attrs = {}
 aeobj_0 = aetypes.ObjectSpecifier(want=aetypes.Type('prcs'), form='indx', seld=aetypes.Unknown('abso', 'all '), fr=None)
 args['----'] = aetypes.ObjectSpecifier(want=aetypes.Type('prop'), form='prop', seld=aetypes.Type('fcrt'), fr=aeobj_0)
 (_reply, args, attrs) = finder.send('core', 'getd', args, attrs)
 if ('errn' in args):
  raise Error, aetools.decodeerror(_arg)
 if ('----' in args):
  p = args['----']
  creators = p[:]
 result = []
 if (len(processnames) > len(processnumbers)):
  data = processnames
 else:
  data = processnumbers
 for i in range(len(creators)):
  result.append((data[i], creators[i]))
 return result

def processes ( ) : finder = _getfinder ( ) args = { } attrs = { } processnames = [ ] processnumbers = [ ] creators = [ ] partitions = [ ] used = [ ] args [ '----' ] = aetypes . ObjectSpecifier ( want = aetypes . Type ( 'prcs' ) , form = 'indx' , seld = aetypes . Unknown ( 'abso' , 'all ' ) , fr = None ) ( _reply , args , attrs ) = finder . send ( 'core' , 'getd' , args , attrs ) if ( 'errn' in args ) : raise Error , aetools . decodeerror ( args ) p = [ ] if ( '----' in args ) : p = args [ '----' ] for proc in p : if hasattr ( proc , 'seld' ) : processnames . append ( proc . seld ) elif hasattr ( proc , 'type' ) : if ( proc . type == 'psn ' ) : processnumbers . append ( proc . data ) args = { } attrs = { } aeobj_0 = aetypes . ObjectSpecifier ( want = aetypes . Type ( 'prcs' ) , form = 'indx' , seld = aetypes . Unknown ( 'abso' , 'all ' ) , fr = None ) args [ '----' ] = aetypes . ObjectSpecifier ( want = aetypes . Type ( 'prop' ) , form = 'prop' , seld = aetypes . Type ( 'fcrt' ) , fr = aeobj_0 ) ( _reply , args , attrs ) = finder . send ( 'core' , 'getd' , args , attrs ) if ( 'errn' in args ) : raise Error , aetools . decodeerror ( _arg ) if ( '----' in args ) : p = args [ '----' ] creators = p [ : ] result = [ ] if ( len ( processnames ) > len ( processnumbers ) ) : data = processnames else : data = processnumbers for i in range ( len ( creators ) ) : result . append ( ( data [ i ] , creators [ i ] ) ) return result
return processes information from osquery cli example: .