
    Pib              
          d Z ddlZddlZddlZddlZddlZddlZddlZddlZddl	Z	ddlm
Z
 ddlmZ ddlmZ 	 ddlmZ n# e$ r dZY nw xY w	 ddlmZ n# e$ r dZY nw xY w e ej        d                    Z e            Zg d	Zej        d
k    Zej        dk    Zej                            d          Zej                            d          ZeZej                            d          Zej                            d          Zej                            d          Z epepe Z!ej                            d          Z"ej                            d          Z#dZ$dZ%dZ&dZ'dZ(dZ)dZ*dZ+dZ,dZ-dZ.dZ/dZ0d Z1d!Z2d"Z3d#Z4d$Z5d%Z6d&Z7d'Z8d(Z9d)Z:d*Z;d+Z<d,Z= G d- d.ej>                  Z? e@            A                    e?jB                    G d/ d0ej>                  ZC e@            A                    eCjB                    ejD                    ZE ejF                    ZGe
eegeegfe
egegfe
gegfe
egegfe
gegfe
egeegfe
geegfegeegfd1ZHe eHA                    egegfegegfd2           ee"seHA                    d3egeegfi            G d4 d5eI          ZJ G d6 d7eJ          ZK G d8 d9eK          ZL G d: d;eJ          ZM G d< d=eJ          ZNd[d>ZOd? ZPd@ ZQdA ZRdB ZSdC ZTdD ZUdE ZVdF ZWd[dGZXdH ZYdI ZZ G dJ dK          Z[dL Z\ e[            Z]e]j^        e\_^        e]j_        e\__        dMZ`dN ZadO ZbeebfdPZcefdQZdd\dSZedT ZfdU ZgePejh        fdV            Zid]dXZjddWejh        fdYZkdZ ZldS )^zCommon objects shared by __init__.py and _ps*.py modules.

Note: this module is imported by setup.py, so it should not import
psutil or third-party modules.
    N)AF_INET)
SOCK_DGRAM)SOCK_STREAM)AF_INET6)AF_UNIXPSUTIL_DEBUG)?FREEBSDBSDLINUXNETBSDOPENBSDMACOSOSXPOSIXSUNOSWINDOWS
CONN_CLOSECONN_CLOSE_WAITCONN_CLOSINGCONN_ESTABLISHEDCONN_FIN_WAIT1CONN_FIN_WAIT2CONN_LAST_ACKCONN_LISTEN	CONN_NONECONN_SYN_RECVCONN_SYN_SENTCONN_TIME_WAITNIC_DUPLEX_FULLNIC_DUPLEX_HALFNIC_DUPLEX_UNKNOWNSTATUS_DEADSTATUS_DISK_SLEEPSTATUS_IDLESTATUS_LOCKEDSTATUS_RUNNINGSTATUS_SLEEPINGSTATUS_STOPPEDSTATUS_SUSPENDEDSTATUS_TRACING_STOPSTATUS_WAITINGSTATUS_WAKE_KILLSTATUS_WAKINGSTATUS_ZOMBIESTATUS_PARKEDENCODINGENCODING_ERRSr   	conn_tmapdeprecated_methodisfile_strictmemoizeparse_environ_blockpath_exists_strictusage_percentsupports_ipv6sockfam_to_enumsocktype_to_enumwrap_numbers	open_textopen_binarycatbcatbytes2humanconn_to_ntupledebughiliteterm_supports_colorsprint_colorposixntlinuxdarwin)freebsdmidnightbsdopenbsdnetbsd)sunossolarisaixrunningsleepingz
disk-sleepstoppedztracing-stopzombiedeadz	wake-killwakingidlelockedwaiting	suspendedparkedESTABLISHEDSYN_SENTSYN_RECV	FIN_WAIT1	FIN_WAIT2	TIME_WAITCLOSE
CLOSE_WAITLAST_ACKLISTENCLOSINGNONEc                       e Zd ZdZdZdZdS )	NicDuplex      r   N)__name__
__module____qualname__r   r    r!        b/home/jaya/work/projects/VOICE-AGENT/VIET/agent-env/lib/python3.11/site-packages/psutil/_common.pyrj   rj   z   s         OOrq   rj   c                       e Zd ZdZdZdS )BatteryTimeN)rm   rn   ro   POWER_TIME_UNKNOWNPOWER_TIME_UNLIMITEDrp   rq   rr   rt   rt      s        rq   rt   )alltcptcp4udpudp4inetinet4inet6)tcp6udp6unixc                   (    e Zd ZdZdZd Zd Zd ZdS )ErrorzQBase exception class. All other psutil exceptions inherit
    from this one.
    psutilc                 ~    t          j                    }|D ]&}t          | |d           }|s|dk    r|dk    r|||<   '|S )Npidr   )collectionsOrderedDictgetattr)selfattrsinfonamevalues        rr   	_infodictzError._infodict   sW    &(( 	# 	#DD$--E #5A::"T
rq   c                    |                      d          }|rEd                    d                    d |                                D                                 }nd }d                    d t	          | dd          |fD                       S )	N)r   ppidr   z({}), c                 "    g | ]\  }}| d |S =rp   .0kvs      rr   
<listcomp>z!Error.__str__.<locals>.<listcomp>   s&    AAADAqa<<!<<AAArq    c                     g | ]}||S rp   rp   )r   xs     rr   r   z!Error.__str__.<locals>.<listcomp>   s    MMMq1MMMMrq   msg )r   formatjoinitemsr   r   r   detailss      rr   __str__zError.__str__   s    ~~566 	mm		AADJJLLAAABB GG GxxMMWT5"%=%=w$GMMMNNNrq   c                     |                      d          }d                    d |                                D                       }d| j        j         d| dS )N)r   r   r   secondsr   r   c                 "    g | ]\  }}| d |S r   rp   r   s      rr   r   z"Error.__repr__.<locals>.<listcomp>   s&    CCCda\\A\\CCCrq   zpsutil.())r   r   r   	__class__rm   r   s      rr   __repr__zError.__repr__   sZ    ~~GHH))CCdjjllCCCDD=0==7====rq   N)rm   rn   ro   __doc__r   r   r   rp   rq   rr   r   r      sU          J  	O 	O 	O> > > > >rq   r   c                   $    e Zd ZdZdZddZd ZdS )NoSuchProcesszXException raised when a process with a certain PID doesn't
    or no longer exists.
    r   Nc                 h    t                               |            || _        || _        |pd| _        d S )Nzprocess no longer existsr   __init__r   r   r   r   r   r   r   s       rr   r   zNoSuchProcess.__init__   s3    t	44rq   c                 8    | j         | j        | j        | j        ffS Nr   r   r   r   r   s    rr   
__reduce__zNoSuchProcess.__reduce__       49dh ?@@rq   NNrm   rn   ro   r   r   r   rp   rq   rr   r   r      sM          J5 5 5 5A A A A Arq   r   c                   $    e Zd ZdZdZddZd ZdS )ZombieProcessa1  Exception raised when querying a zombie process. This is
    raised on macOS, BSD and Solaris only, and not always: depending
    on the query the OS may be able to succeed anyway.
    On Linux all zombie processes are querable (hence this is never
    raised). Windows doesn't have zombie processes.
    r   Nc                 `    t                               | |||           || _        |pd| _        d S )Nz"PID still exists but it's a zombie)r   r   r   r   )r   r   r   r   r   s        rr   r   zZombieProcess.__init__   s4    tS$444	>>rq   c                 D    | j         | j        | j        | j        | j        ffS r   )r   r   r   r   r   r   s    rr   r   zZombieProcess.__reduce__   s     49di JKKrq   NNNr   rp   rq   rr   r   r      sM          J? ? ? ?
L L L L Lrq   r   c                   $    e Zd ZdZdZddZd ZdS )AccessDeniedz@Exception raised when permission to perform an action is denied.r   Nc                 h    t                               |            || _        || _        |pd| _        d S )Nr   r   r   s       rr   r   zAccessDenied.__init__   s1    t	9"rq   c                 8    | j         | j        | j        | j        ffS r   r   r   s    rr   r   zAccessDenied.__reduce__   r   rq   r   r   rp   rq   rr   r   r      sG        JJJ   A A A A Arq   r   c                   $    e Zd ZdZdZddZd ZdS )TimeoutExpiredzWRaised on Process.wait(timeout) if timeout expires and process
    is still alive.
    r   Nc                 z    t                               |            || _        || _        || _        d| d| _        d S )Nztimeout after z seconds)r   r   r   r   r   r   )r   r   r   r   s       rr   r   zTimeoutExpired.__init__  s?    t	5G555rq   c                 8    | j         | j        | j        | j        ffS r   )r   r   r   r   r   s    rr   r   zTimeoutExpired.__reduce__  s    tx CDDrq   r   r   rp   rq   rr   r   r     sM          J6 6 6 6E E E E Erq   r   c                 x    	 t          |           |z  dz  }|t          ||          }|S # t          $ r Y dS w xY w)z5Calculate percentage usage of 'used' against 'total'.d   Ng        )floatroundZeroDivisionError)usedtotalround_rets       rr   r8   r8     s\    T{{U"c) V$$C
    sss   + 
99c                 f     t          j                    fd            }fd}i ||_        |S )a  A simple memoize decorator for functions supporting (hashable)
    positional arguments.
    It also provides a cache_clear() function for clearing the cache:

    >>> @memoize
    ... def foo()
    ...     return 1
        ...
    >>> foo()
    1
    >>> foo.cache_clear()
    >>>

    It supports:
     - functions
     - classes (acts as a @singleton)
     - staticmethods
     - classmethods

    It does NOT support:
     - methods
    c                      | t          t          |                                                    f}	 |         S # t          $ r) 	  | i |x}|<   n# t          $ r}|d d }~ww xY w|cY S w xY wr   )	frozensetsortedr   KeyError	Exception)argskwargskeyr   errcachefuns        rr   wrapperzmemoize.<locals>.wrapper?  s    Yvfllnn55667	: 	 	 	$#&3#7#7#77eCjj $ $ $t#$JJJ	s3   ; 
A.AA.
A&A!!A&&A.-A.c                  0                                       dS )zClear cache.N)clear)r   s   rr   cache_clearzmemoize.<locals>.cache_clearK  s    rq   )	functoolswrapsr   )r   r   r   r   s   `  @rr   r5   r5   '  sf    0 _S	 	 	 	 	 	     E%GNrq   c                 n     t          j                    fd            }d }d }||_        ||_        |S )a  A memoize decorator which is disabled by default. It can be
    activated and deactivated on request.
    For efficiency reasons it can be used only against class methods
    accepting no arguments.

    >>> class Foo:
    ...     @memoize
    ...     def foo()
    ...         print(1)
    ...
    >>> f = Foo()
    >>> # deactivated (default)
    >>> foo()
    1
    >>> foo()
    1
    >>>
    >>> # activated
    >>> foo.cache_activate(self)
    >>> foo()
    1
    >>> foo()
    >>> foo()
    >>>
    c                    	 | j                  }nz# t          $ r$ 	  |           cY S # t          $ r}|d d }~ww xY wt          $ rA 	  |           }n# t          $ r}|d d }~ww xY w	 || j         <   n# t          $ r Y nw xY wY nw xY w|S r   )_cacheAttributeErrorr   r   )r   r   r   r   s      rr   r   z'memoize_when_activated.<locals>.wrappero  s    	+c"CC 	$ 	$ 	$$s4yy    $ $ $t#$ 	 	 	$c$ii $ $ $t#$#&C  !    	 
sq    
B
)B
;6;BAB
A&A!!A&&B*
A54B5
B?BBBBc                     i | _         dS )zsActivate cache. Expects a Process instance. Cache will be
        stored as a "_cache" instance attribute.
        N)r   procs    rr   cache_activatez.memoize_when_activated.<locals>.cache_activate  s     rq   c                 .    	 | ` dS # t          $ r Y dS w xY w)zDeactivate and clear cache.N)r   r   r   s    rr   cache_deactivatez0memoize_when_activated.<locals>.cache_deactivate  s2    	 	 	 	DD	s    
)r   r   r   r   )r   r   r   r   s   `   rr   memoize_when_activatedr   T  sh    6 _S    2     ,G/GNrq   c                     	 t          j        |           }t          j        |j                  S # t          $ r  t
          $ r Y dS w xY w)zSame as os.path.isfile() but does not swallow EACCES / EPERM
    exceptions, see:
    http://mail.python.org/pipermail/python-dev/2012-June/120787.html.
    F)osstatS_ISREGst_modePermissionErrorOSError)pathsts     rr   r4   r4     sa    
(WT]] |BJ'''       uus   / AAc                 f    	 t          j        |            dS # t          $ r  t          $ r Y dS w xY w)zSame as os.path.exists() but does not swallow EACCES / EPERM
    exceptions. See:
    http://mail.python.org/pipermail/python-dev/2012-June/120787.html.
    TF)r   r   r   r   )r   s    rr   r7   r7     sT    

 t       uus    00c                      t           j        rt          dS 	 t          j         t          t           j                  5 } |                     d           ddd           n# 1 swxY w Y   dS # t
          $ r Y dS w xY w)z2Return True if IPv6 is supported on this platform.NF)z::1r   T)sockethas_ipv6r   r   bindr   )socks    rr   r9   r9     s    ? h.u]8V%788 	"DIIj!!!	" 	" 	" 	" 	" 	" 	" 	" 	" 	" 	" 	" 	" 	" 	"t   uus4   $A* AA* A!!A* $A!%A* *
A87A8c                    i }d}t           }	 |                     d|          }||k    rnU|                     d||          }||k    r2| ||         }| |dz   |         }|r|                                }|||<   |dz   }r|S )zCParse a C environ block of environment variables into a dictionary.r   T r   rl   )r   findupper)datar   posWINDOWS_next_pos	equal_posr   r   s           rr   r6   r6     s     C
C H99T3''s??IIc311	s??s9}%CQ12E "iikkCHl  Jrq   c                 P    	 t          j        |           S # t          $ r | cY S w xY w)zConvert a numeric socket family value to an IntEnum member.
    If it's not a known member, return the numeric value itself.
    )r   AddressFamily
ValueErrornums    rr   r:   r:     s<    #C(((   


    %%c                 P    	 t          j        |           S # t          $ r | cY S w xY w)zConvert a numeric socket type value to an IntEnum member.
    If it's not a known member, return the numeric value itself.
    )r   
SocketKindr  r  s    rr   r;   r;     s<     %%%   


r  c           	         ddl m} |t          j        t          hv r|r
 |j        | }|r
 |j        | }|t          j        k    r,|t          t          hv r|                    |t                    }nt          }t          |          }t          |          }||                    | |||||          S |                    | ||||||          S )z2Convert a raw connection tuple to a proper ntuple.rl   )_ntuples)r   r  r   r   r   addrr   getr   r:   r;   pconnsconn)	fdfamtype_laddrraddrstatus
status_mapr   ntps	            rr   rB   rB     s    !!!!!!
v~x((( 	%CHe$E 	%CHe$E"""sw.A'A'A	22
#

CU##E
{yyS%v>>>yyS%vsCCCrq   c                 b   ddl }| j        r| j        sdS | j        t          j        k    r8t          |                    | j         d| j         d          j                  S | j        t          j	        k    r8t          |
                    | j         d| j         d          j                  S dS )zbGiven the address ntuple returned by ``net_if_addrs()``
    calculates the broadcast address.
    r   N/F)strict)	ipaddressaddressnetmaskfamilyr   r   strIPv4Networkbroadcast_addressr   IPv6Network)r  r"  s     rr   broadcast_addrr*  
  s     < t| t{fn$$!!<00$,00 "  
 
 	

 {fo%%!!<00$,00 "  
 
 	
 &%rq   c                       fd}|S )zA decorator which can be used to mark a method as deprecated
    'replcement' is the method name which will be called instead.
    c                     | j          d d| j        | _        t          j        |           fd            }|S )Nz*() is deprecated and will be removed; use z
() insteadc                 h    t          j        t          d            t          |           |i |S )Nrk   )category
stacklevel)warningswarnDeprecationWarningr   )r   r   r   r   replacements      rr   innerz/deprecated_method.<locals>.outer.<locals>.inner-  s:    M#(:qIIII-74--t>v>>>rq   )rm   r   r   r   )r   r4  r   r3  s     @rr   outerz deprecated_method.<locals>.outer%  su    | ( (( ( ( 	 ;CK				? 	? 	? 	? 	? 
		? rq   rp   )r3  r5  s   ` rr   r3   r3      s#    
     Lrq   c                   8    e Zd ZdZd Zd Zd Zd Zd	dZd Z	dS )
_WrapNumberszNWatches numbers so that they don't overflow and wrap
    (reset to zero).
    c                 `    t          j                    | _        i | _        i | _        i | _        d S r   )	threadingLocklockr   	remindersreminder_keysr   s    rr   r   z_WrapNumbers.__init__<  s-    N$$	
rq   c                     || j         vsJ || j        vsJ || j        vsJ || j         |<   t          j        t
                    | j        |<   t          j        t                    | j        |<   d S r   )r   r<  r=  r   defaultdictintset)r   
input_dictr   s      rr   	_add_dictz_WrapNumbers._add_dictB  s}    4:%%%%4>))))4-----%
4*6s;;t#.#:3#?#?4   rq   c                    | j         |         }t          |                                          t          |                                          z
  }|D ]4}| j        |         |         D ]}| j        |         |= | j        |         |= 5dS )zIn case the number of keys changed between calls (e.g. a
        disk disappears) this removes the entry from self.reminders.
        N)r   rA  keysr=  r<  )r   rB  r   old_dict	gone_keysgone_keyremkeys          rr   _remove_dead_remindersz#_WrapNumbers._remove_dead_remindersJ  s     :d#((3z/@/@+A+AA	! 	3 	3H,T28< 1 1N4(00"4(22	3 	3rq   c                 l   || j         vr|                     ||           |S |                     ||           | j         |         }i }|D ]}||         }	 ||         }n# t          $ r |||<   Y %w xY wg }t	          t          |                    D ]}	||	         }
||	         }||	f}|
|k     rA| j        |         |xx         |z  cc<   | j        |         |                             |           |	                    |
| j        |         |         z              t          |          ||<   || j         |<   |S )zlCache dict and sum numbers which overflow and wrap.
        Return an updated copy of `input_dict`.
        )r   rC  rJ  r   rangelenr<  r=  addappendtuple)r   rB  r   rF  new_dictr   input_tuple	old_tuplebitsiinput_value	old_valuerI  s                rr   runz_WrapNumbers.runU  s    tz!!NN:t,,,##J555:d# 	( 	(C$S/K$SM		    !,	 D3{++,, H H)!n%aL	q**N4(000I=000&t,S155f===K$.*>v*FFGGGG!$KKHSMM%
4s   AA/.A/Nc                    | j         5  |L| j                                         | j                                         | j                                         nQ| j                            |d           | j                            |d           | j                            |d           ddd           dS # 1 swxY w Y   dS )z>Clear the internal cache, optionally only for function 'name'.N)r;  r   r   r<  r=  pop)r   r   s     rr   r   z_WrapNumbers.cache_clear|  s    Y 	3 	3|
  """$$&&&"((****
tT***""4..."&&tT222	3 	3 	3 	3 	3 	3 	3 	3 	3 	3 	3 	3 	3 	3 	3 	3 	3 	3s   B B55B9<B9c                 l    | j         5  | j        | j        | j        fcddd           S # 1 swxY w Y   dS )z5Return internal cache dicts as a tuple of 3 elements.N)r;  r   r<  r=  r   s    rr   
cache_infoz_WrapNumbers.cache_info  s    Y 	D 	DJ0BC	D 	D 	D 	D 	D 	D 	D 	D 	D 	D 	D 	D 	D 	D 	D 	D 	D 	Ds   )--r   )
rm   rn   ro   r   r   rC  rJ  rX  r   r\  rp   rq   rr   r7  r7  7  s              @ @ @	3 	3 	3% % %N
3 
3 
3 
3D D D D Drq   r7  c                     t           j        5  t                               | |          cddd           S # 1 swxY w Y   dS )zGiven an `input_dict` and a function `name`, adjust the numbers
    which "wrap" (restart from zero) across different calls by adding
    "old value" to "new value" and return an updated dict.
    N)_wnr;  rX  )rB  r   s     rr   r<   r<     s    
 
 ) )wwz4(() ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) ) )s   599i   c                 0    t          | dt                    S )Nrb)	buffering)openFILE_READ_BUFFER_SIZE)fnames    rr   r>   r>     s    t'<====rq   c                     t          | t          t          t                    }	 t          |_        n.# t
          $ r Y n"t          $ r |                                  w xY w|S )zaOpen a file in text mode by using the proper FS encoding and
    en/decoding error handlers.
    )ra  encodingerrors)rb  rc  r0   r1   _CHUNK_SIZEr   r   close)rd  fobjs     rr   r=   r=     s     '	  D 1      

 Ks   1 
AAc                    |t           u r9 ||           5 }|                                cddd           S # 1 swxY w Y   dS 	  ||           5 }|                                cddd           S # 1 swxY w Y   dS # t          $ r |cY S w xY w)zRead entire file content and return it as a string. File is
    opened in text mode. If specified, `fallback` is the value
    returned in case of error, either if the file does not exist or
    it can't be read().
    N)_DEFAULTreadr   )rd  fallback_openfs       rr   r?   r?     s,    8U5\\ 	Q6688	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 		u  vvxx                                    	 	 	OOO	sB   6::A= A0#A= 0A44A= 7A48A= =BBc                 0    t          | |t                    S )z,Same as above but opens file in binary mode.)rn  ro  )r?   r>   )rd  rn  s     rr   r@   r@     s    ux{;;;;rq   %(value).1f%(symbol)sc                 P   d}i }t          |dd                   D ]\  }}d|dz   dz  z  ||<   t          |dd                   D ]F}t          |           ||         k    r+t          |           ||         z  }|t	                      z  c S G|t          |d         |           z  S )zUsed by various scripts. See: https://code.activestate.com/recipes/578019-bytes-to-human-human-to-bytes-converter/?in=user-4178764.

    >>> bytes2human(10000)
    '9.8K'
    >>> bytes2human(100001221)
    '95.4M'
    )	BKMGTPEZYrl   N
   r   )symbolr   )	enumeratereversedabsr   localsdict)nr   symbolsprefixrU  sr~  r   s           rr   rA   rA     s     <GF'!""+&& & &1!a%2%q		7122;'' % %q66VF^##!HHvf~-EFHH$$$$ $ D
!44444rq   c                  0    t           j        d         j        S )z+Return updated psutil.PROCFS_PATH constant.r   )sysmodulesPROCFS_PATHrp   rq   rr   get_procfs_pathr    s    ;x ,,rq   c                 D    |                      t          t                    S )N)rf  rg  )decoder0   r1   )r  s    rr   r  r    s    88Xm8<<<rq   c                     t          | d          r|                                 sdS 	 |                                  n# t          $ r Y dS w xY wdS )NisattyFT)hasattrr  filenor   files    rr   rE   rE     sc    4"" $++-- u   uu4s   = 
A
AFc                    t                      s| S g }t          ddddddddd	
	  	        }d|d<   	 ||         }nE# t          $ r8 d|dt          |                                           }t          |          dw xY w|                    |           |r|                    d           dd                    |           d|  dS )z*Return an highlighted version of 'string'.343330323736913593)	bluebrowndarkgreygreengrey	lightblueredvioletyellow29Ninvalid color z; choose amongst 1z[;mz[0m)rE   r  r   listrE  r  rO  r   )r  colorboldattrcolorsr   s         rr   rD   rD   	  s   !! D
 
 
F F4L(u ( ( (NuNNfkkmm9L9LNNoo4'( 	KK C.388D>>..A....s
   : AA<c                    t                      st          | |           dS t          r"t          t          | ||          |           dS ddl}d}|j        j        j        }|j        j        j        }t          dddd          }||d<   	 ||         }nE# t          $ r8 d	|d
t          |                                          }	t          |	          dw xY w|r|dk    r|dz  }|t          j        u rdnd}
|j        |_         ||
          } |||           	 t          | |            |||           dS #  |||           w xY w)z$Print a colorized version of string.r  r   N   rk         )r  r  r  r  r  z; choose between    ii)rE   printr   rD   ctypeswindllKernel32GetStdHandleSetConsoleTextAttributer  r   r  rE  r  r  stderrc_ulongrestype)r  r  r  r  r  DEFAULT_COLORr  r  r  r   	handle_idhandles               rr   rF   rF   %  s     !! !;ad	 ;fQt$$4000000}-:M": 	  A1Aa888$t	,5MEE 	, 	, 	,, , ,'', ,  S//t+	,  	EQJJQJE3:--CC3	%~i((...	;!$##FM:::::##FM::::s   B ACD< <E
c                 6   t           rddl}|                    |                                j                  \  }}}}}t          | t                    r t          | t                    rd|  } nd| } t          d| d| d|  t          j
                   dS dS )z@If PSUTIL_DEBUG env var is set, print a debug message to stderr.r   Nz	ignoring zpsutil-debug [:z]> r  )r   inspectgetframeinfocurrentframef_back
isinstancer   r   r  r  r  )r   r  rd  lineno__lines_indexs          rr   rC   rC   M  s     
+2+?+?  ""),
 ,
(vq&& c9%% 	*#w'' *'#'')#))5U55V5555CJ	
 	
 	
 	
 	
 	

 
rq   r   )rr  )NF)mr   r   enumr   r   r   r   r  r9  r0  r   r   r   r   ImportErrorr   boolgetenvr   objectrl  __all__r   r   r   platform
startswithr   r   r   r	   r   r   r
   r   AIXr&   r'   r#   r(   r*   r.   r"   r,   r-   r$   r%   r+   r)   r/   r   r   r   r   r   r   r   r   r   r   r   r   IntEnumrj   globalsupdate__members__rt   getfilesystemencodingr0   getfilesystemencodeerrorsr1   r2   r   r   r   r   r   r   r8   r5   r   r4   r7   r9   r6   r:   r;   rB   r*  r3   r7  r<   r^  r   r\  rc  r>   r=   r?   r@   rA   r  r  stdoutrE   rD   rF   rC   rp   rq   rr   <module>r     sy  
           				   



                          HHH   GGG tIBIn--..688  D 	7
'T/(())
,
!
!"<
=
=
,
!
!)
,
,		 	 	*	*""F 455	le$$   $    ! 
	        		  & ' ' '    $,   
 		  ( ) ) ) %3$&&--// h(;
*CDh+/Y&h*.Y%x ;
";<i+z23j;
34	 		 k]+j\*    
 ufy;
*CDEFFF> > > > >I > > >BA A A A AE A A A"L L L L LM L L L&A A A A A5 A A AE E E E EU E E E.	 	 	 	* * *ZD D DN( ( (  	 	 	  8    D D D D*
 
 
,  .TD TD TD TD TD TD TD TDn) ) ) lnn? .  " > > >  4 !	    " " < < < <
5 5 5 5&- - -
= = = 	!j    	/ / / /: CJ%; %; %; %;P
 
 
 
 
s#   A A
AA A A 