#NEWLINE# def procs( count = False ) : #NEWLINE# #INDENT# "\n    Return the process data\n\n    count : False\n        If ``True``, this function will simply return the number of processes.\n\n        .. versionadded:: 2015.8.0\n\n    CLI Example:\n\n    .. code-block:: bash\n\n        salt '*' status.procs\n        salt '*' status.procs count\n    " #NEWLINE# with salt . utils . winapi . Com ( ) : #NEWLINE# #INDENT# wmi_obj = wmi . WMI ( ) #NEWLINE# processes = wmi_obj . win32_process ( ) #NEWLINE# #UNINDENT# if count : #NEWLINE# #INDENT# return len ( processes ) #NEWLINE# #UNINDENT# process_info = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# for proc in processes : #NEWLINE# #INDENT# process_info [ wmi_obj . ProcessId ] = _get_process_info ( proc ) #NEWLINE# #UNINDENT# return process_info