+
    Bi                     l    R t ^ RIt^ RIt^ RIt^ RIt^ RIHt ^ RIHt ^ RI	H
t
 RR lt ! R R4      tR# )	z.
Helper to run a script in a pseudo-terminal.
N)	ExitStack)EIO)import_modulec                    \        R 4      p\        4       pVP                  4       w  rV\        P                  RV 3p\
        P                  ! WvWfVR7      p\        P                  ! V4       \        4       ;_uu_ 4       p	V	P                  V4       R p
V	P                  W4       V	P                  \        P                  V4       V	P                  \        P                  ! 4       4      pVP                  V\        P                  \        P                   ,          4       \        P"                  ! VR4        VP%                  4        F  w  rV\        P                  ,          '       d@    \        P&                  ! VR4      pV'       g   Vu uuRRR4       # VP/                  V4       V\        P                   ,          '       g   K   V\        P0                  ! WQ4      R pV'       d   K  VP3                  V\        P                  4       K  	  K    \(         d#   pTP*                  \,        8w  d   h Rp Rp?LRp?ii ; i  \(         d#   pTP*                  \,        8w  d   h Rp Rp?LRp?ii ; i  + '       g   i     R# ; i)ptyz-c)stdinstdoutstderrenvc                 L     V P                  4        R #   \         d     R # i ; iN)	terminateProcessLookupError)procs   &./usr/lib/python3.14/test/support/pty_helper.pyr   run_pty.<locals>.terminate   s#     % s    ##Fi       N)r   	bytearrayopenptysys
executable
subprocessPopenoscloser   enter_contextcallback	selectorsSelectSelectorregister
EVENT_READEVENT_WRITEset_blockingselectreadOSErrorerrnor   extendwritemodify)scriptinputr
   r   outputmasterslaveargsr   cleanupr   sel_eventschunkerrs   &&&             r   run_ptyr6      s   

C[FkkmOVNND&)DDesSDHHUO	d#	 	)6* ##I$<$<$>?VY11I4I4IIJ
&"zz|I0000$ " 8 !%; 
< MM%(I1111$ %bhhv&=&> ? !5

69+?+?@+  , # $99+! #	$ # $99+! #	$E 
ss   <C)I-&H=I-I-+I-H=I-'&I-H:	H5	0I-5H:	:I-=I*	I%	 I-%I*	*I--I>	c                   0   a  ] tR t^Ct o RtR tR tRtV tR# )	FakeInputz
A fake input stream for pdb's interactive debugger.  Whenever a
line is read, print it (to simulate the user typing it), and then
return it.  The set of lines to return is specified in the
constructor; they should not have trailing newlines.
c                    Wn         R # r   lines)selfr;   s   &&r   __init__FakeInput.__init__J   s    
r   c                `    V P                   P                  ^ 4      p\        V4       VR,           # )    
)r;   popprint)r<   lines   & r   readlineFakeInput.readlineM   s%    zz~~a dd{r   r:   N)	__name__
__module____qualname____firstlineno____doc__r=   rE   __static_attributes____classdictcell__)__classdict__s   @r   r8   r8   C   s      r   r8   )s   dummy inputN)rK   r   r   r   r   
contextlibr   r&   r   test.support.import_helperr   r6   r8    r   r   <module>rR      s2    
   
    4/Al r   