ok

Mini Shell

Direktori : /lib64/python2.7/Demo/tkinter/guido/
Upload File :
Current File : //lib64/python2.7/Demo/tkinter/guido/ShellWindow.pyc

�
V
�Qc@s�ddlZddlZddlZddlTddlmZddlmZddlZdZdefd��YZdZ	d	�Z
d
�Zedkr�e�ndS(i����N(t*(tScrolledText(tDialogitShellWindowcBsheZd
d
d�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d�Zd	�ZRS(cKs|s>ytjd}Wntk
r0d}nX|d}ntj|�}|d}ttj||f|�d|_|j	d|j
�|j	d|j�|j	d|j�|j	d	|j
�|j	d
|j�t||�\|_|_|_|jj|jt|j�dS(NtSHELLs/bin/shs -iis1.0s<Return>s<Control-c>s<Control-t>s<Control-k>s<Control-d>(tostenvirontKeyErrortstringtsplittapplyRt__init__tpostbindtinputhandlertsiginttsigtermtsigkilltsendeoftspawntpidt	fromchildttochildttktcreatefilehandlertREADABLEt
outputhandler(tselftmastertshelltcnftargs((s6/usr/lib64/python2.7/Demo/tkinter/guido/ShellWindow.pyR
s$



	!c	Cstj|t�}|s�|jj|�tj|jd�\}}dG|GdG|GHd|_|d?}|d@}|dkr�d|}n%d|d@}|d	@r�|d
}nt|j	d|dd
dddddd�dS|j
t|�|jd�|_
|jt�dS(NiRtstatusii�sexit status %dskilled by signal %dii�s -- core dumpedttextttitlesExit statustbitmaptwarningtdefaulttstringstOKsend - 1 char(R'(RtreadtBUFSIZERtdeletefilehandlertwaitpidRtNoneRRtinserttENDtindexRtyview_pickplace(	RtfiletmasktdataRtststdetailtcausetmsg((s6/usr/lib64/python2.7/Demo/tkinter/guido/ShellWindow.pyR#s.	




cGse|js|j�dS|jtd�|j|jd�}|jt�|_tj|j	|�dS(Ntbreaks
send - 1 char(
Rt
no_processR-R.tgetRR/RtwriteR(RRtline((s6/usr/lib64/python2.7/Demo/tkinter/guido/ShellWindow.pyR=s	
cGs+|js|j�dStj|j�dS(NR8(RR9RtcloseR(RR((s6/usr/lib64/python2.7/Demo/tkinter/guido/ShellWindow.pyRGs
	
cCs.|js|j�dStj|j|�dS(NR8(RR9Rtkill(Rtsig((s6/usr/lib64/python2.7/Demo/tkinter/guido/ShellWindow.pytsendsigNs
	
cGs|jtj�S(N(R@tsignaltSIGINT(RR((s6/usr/lib64/python2.7/Demo/tkinter/guido/ShellWindow.pyRUscGs|jtj�S(N(R@RAtSIGQUIT(RR((s6/usr/lib64/python2.7/Demo/tkinter/guido/ShellWindow.pytsigquitXscGs|jtj�S(N(R@RAtSIGTERM(RR((s6/usr/lib64/python2.7/Demo/tkinter/guido/ShellWindow.pyR[scGs|jtj�S(N(R@RAtSIGKILL(RR((s6/usr/lib64/python2.7/Demo/tkinter/guido/ShellWindow.pyR^scCs/t|jddddddddd	d�dS(NR!sNo active processR"s
No processR#terrorR%iR&R'(sOK(RR(R((s6/usr/lib64/python2.7/Demo/tkinter/guido/ShellWindow.pyR9asN(
t__name__t
__module__R,RRRRR@RRDRRR9(((s6/usr/lib64/python2.7/Demo/tkinter/guido/ShellWindow.pyRs		
						idcCs\tj�\}}tj�\}}tj�}|dkr5x6dD].}ytj|�WqCtjk
rpqCXqCWtj|�dkr�tjjd�ntj|�dkr�tjjd�ntj|�dkr�tjjd�ntj	dt
�ztj||�Wdtjjd�tjd�Xntj|�tj|�|||fS(	Niiispopen2: bad read dup
spopen2: bad write dup
isexecvp failed
(iii(
RtpipetforkR=RGtduptsyststderrR;t
closerangetMAXFDtexecvpt_exit(tprogRtp2creadtp2cwritetc2preadtc2pwriteRti((s6/usr/lib64/python2.7/Demo/tkinter/guido/ShellWindow.pyRks.


cCs�tjtjd�}t�}|jdd�|rJt|d|�}nt|�}|jdddt�|j	�|j
j�dS(NiRtexpandtfill(RtjoinRMtargvtTktminsizeRtpacktBOTHt	focus_setRtmainloop(Rtroottw((s6/usr/lib64/python2.7/Demo/tkinter/guido/ShellWindow.pyttest�s	
t__main__(
RRMRtTkinterRRRAR)RRPRReRH(((s6/usr/lib64/python2.7/Demo/tkinter/guido/ShellWindow.pyt<module>s
^		

Zerion Mini Shell 1.0