Your IP : 3.138.134.247


Current Path : /opt/alt/python36/lib64/python3.6/__pycache__/
Upload File :
Current File : //opt/alt/python36/lib64/python3.6/__pycache__/code.cpython-36.opt-2.pyc

3

��2av)�@s�ddlZddlZddlZddlmZmZddddgZGdd�d�ZGdd�de�Zdd	d�Z	e
d
kr�ej�Zej
ddd
d�ej�Zejs�ejjr�dZndZe	e�dS)�N)�CommandCompiler�compile_command�InteractiveInterpreter�InteractiveConsole�interactrc@sBeZdZddd�Zddd�Zdd	�Zdd
d�Zdd
�Zdd�ZdS)rNcCs$|dkrddd�}||_t�|_dS)NZ__console__)�__name__�__doc__)�localsr�compile)�selfr	�r�)/opt/alt/python36/lib64/python3.6/code.py�__init__s	
zInteractiveInterpreter.__init__�<input>�singlec
CsRy|j|||�}Wn$tttfk
r6|j|�dSX|dkrDdS|j|�dS)NFT)r
�
OverflowError�SyntaxError�
ValueError�showsyntaxerror�runcode)r�source�filename�symbol�coderrr
�	runsource's

z InteractiveInterpreter.runsourcecCs>yt||j�Wn(tk
r&�Yn|j�YnXdS)N)�execr	�
SystemExit�
showtraceback)rrrrr
rNszInteractiveInterpreter.runcodecCs�tj�\}}}|t_|t_|t_|rp|tkrpy|j\}\}}}}	Wntk
rVYnXt|||||	f�}|t_tjtj	kr�t
j||�}
|jdj
|
��ntj|||�dS)N�)�sys�exc_info�	last_type�
last_value�last_tracebackr�argsr�
excepthook�__excepthook__�	traceback�format_exception_only�write�join)rr�type�value�tb�msgZdummy_filename�lineno�offset�line�linesrrr
rasz&InteractiveInterpreter.showsyntaxerrorcCs|tj�\t_t_}}|t_zPtj|d|d|j�}tjtj	krT|j
dj|��ntj|d|d|�Wdd}}XdS)Nr�r)rr r!r"r#r'�format_exception�tb_nextr%r&r)r*)rZlast_tbZeir2rrr
r�sz$InteractiveInterpreter.showtracebackcCstjj|�dS)N)r�stderrr))r�datarrr
r)�szInteractiveInterpreter.write)N)rr)N)	r�
__module__�__qualname__rrrrrr)rrrr
rs	

'
#c@s:eZdZddd�Zdd�Zddd�Zd	d
�Zddd
�ZdS)rN�	<console>cCstj||�||_|j�dS)N)rrr�resetbuffer)rr	rrrr
r�s
zInteractiveConsole.__init__cCs
g|_dS)N)�buffer)rrrr
r;�szInteractiveConsole.resetbufferc!CsPy
tjWntk
r$dt_YnXy
tjWntk
rJdt_YnXd}|dkrx|jdtjtj||jjf�n|r�|jdt	|��d}x�yP|r�tj}ntj}y|j
|�}Wn tk
r�|jd�PYnX|j|�}Wq�t
k
�r|jd�|j�d}Yq�Xq�W|dk�r4|jd	|jj�n|d
k�rL|jd|�dS)Nz>>> z... zFType "help", "copyright", "credits" or "license" for more information.zPython %s on %s
%s
(%s)
z%s
r�
z
KeyboardInterrupt
znow exiting %s...
r)rZps1�AttributeErrorZps2r)�version�platform�	__class__r�str�	raw_input�EOFError�push�KeyboardInterruptr;)r�banner�exitmsgZcprt�more�promptr1rrr
r�sF






zInteractiveConsole.interactcCs6|jj|�dj|j�}|j||j�}|s2|j�|S)Nr=)r<�appendr*rrr;)rr1rrIrrr
rE�szInteractiveConsole.pushrcCst|�S)N)�input)rrJrrr
rCszInteractiveConsole.raw_input)Nr:)NN)r)rr8r9rr;rrErCrrrr
r�s


6cCsJt|�}|dk	r||_n"yddl}Wntk
r8YnX|j||�dS)Nr)rrC�readline�ImportErrorr)rGZreadfuncZlocalrHZconsolerMrrr
rs�__main__z-q�
store_truez*don't print version and copyright messages)�action�helpr)NNNN)rr'�argparseZcodeoprr�__all__rrrr�ArgumentParser�parser�add_argument�
parse_argsr$�q�flags�quietrGrrrr
�<module>s$t


?>