
    i5                     l    S r SSKrSSKrSSKrSSKrSSKJr  SSKJr  SSKJr  SSKJ	r	  S	S jr
S
S jrg)z9General console printing utilities used by the Cloud SDK.    N)console_attr)console_pager)encoding)filesc                    [         R                  R                  5       (       d  gU (       a$  [         R                  R                  5       (       d  gU(       a$  [         R                  R                  5       (       d  gU(       aA  [
        R                  " S5      n[
        R                  " S5      nU(       d  U(       a  US:X  a  gg)a  Determines if the current terminal session is interactive.

sys.stdin must be a terminal input stream.

Args:
  output: If True then sys.stdout must also be a terminal output stream.
  error: If True then sys.stderr must also be a terminal output stream.
  heuristic: If True then we also do some additional heuristics to check if
             we are in an interactive context. Checking home path for example.

Returns:
  True if the current terminal session is interactive.
FHOMEHOMEPATH/T)sysstdinisattystdoutstderrosgetenv)outputerror	heuristichomehomepaths        W/var/www/html/banglarbhumi/venv/lib/python3.13/site-packages/fire/console/console_io.pyIsInteractiver      s|     
				CJJ%%''
3::$$&& 99VDyy$HTTS[	    c                 (   [        SS9(       d  UR                  U 5        gU(       Ga  [        R                  " [        R
                  SS5      nUS:X  a  SnO/U(       d(  S H"  n[        R                  " U5      (       d  M   Un  O   U(       Ga_  [        R                  " [        R
                  SS5      nSU=(       d    S	-   n[        R                  " [        R
                  SU5        [        R                  " [        R                  [        R                  5        [        R                  " U[        R                  SS
9n[        R                   " 5       R#                  5       n	UR%                  U R'                  U	5      S9  UR)                  5         [        R                  " [        R                  [        R*                  5        Uc&  [        R                  " [        R
                  SS5        g[,        R.                  " XU5      R1                  5         g)zRun a user specified pager or fall back to the internal pager.

Args:
  contents: The entire contents of the text lines to page.
  out: The output stream.
  prompt: The page break prompt.
  check_pager: Checks the PAGER env var and uses it if True.
T)r   NPAGER-)lesspagerLESSz-R )r   shell)input)r   writer   GetEncodedValuer   environr   FindExecutableOnPathSetEncodedValuesignalSIGINTSIG_IGN
subprocessPopenPIPEr   GetConsoleAttrGetEncodingcommunicateencodewaitSIG_DFLr   PagerRun)
contentsoutpromptcheck_pagerr   command	less_origr   pencs
             r   Morer>   D   s`    
d	#IIh
$$RZZ$?E|e&'%%g..%
 '  **2::vtDiY_"%drzz648 mmFMM6>>2


5
t
Da'')557cmm(//#.m/ffhmmFMM6>>2		  VT:hV,002r   )FFF)NT)__doc__r   r(   r+   r   fire.consoler   r   r   r   r   r>    r   r   <module>rB      s.     @ 	   
 % & ! $N*3r   