parameters: ()
return_statement: return result
docstring: processes returns a list of all active processes running on this computer and their creators.
docstring_summary: processes returns a list of all active processes running on this computer and their creators.
docstring_tokens: processes returns a list of all active processes running on this computer and their creators .
function: def processes():
      """processes returns a list of all active processes running on this computer and their creators."""
      finder = _getfinder()
      args = {}
      attrs = {}
      processnames = []
      processnumbers = []
      creators = []
      partitions = []
      used = []
      ## get the processnames or else the processnumbers
      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'):
                  # it has a real name
                  processnames.append(proc.seld)
              elif hasattr(proc, 'type'):
                  if proc.type == "psn ":
                      # it has a process number
                      processnumbers.append(proc.data)
      ## get the creators
      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[:]
      ## concatenate in one dict
      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
function_tokens: def processes ( ) : finder = _getfinder ( ) args = { } attrs = { } processnames = [ ] processnumbers = [ ] creators = [ ] partitions = [ ] used = [ ] ## get the processnames or else the processnumbers 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' ) : # it has a real name processnames . append ( proc . seld ) elif hasattr ( proc , 'type' ) : if proc . type == "psn " : # it has a process number processnumbers . append ( proc . data ) ## get the creators 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 [ : ] ## concatenate in one dict 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