Tryag File Manager
Home
-
Turbo Force
Current Path :
/
usr
/
lib
/
python2.4
/
Upload File :
New :
File
Dir
//usr/lib/python2.4/pty.pyo
mò ‚=5Dc�����������@���s���d��Z��d�k�l�Z�d�k�Z�d�k�Z�d�d�d�g�Z�d�Z�d�Z�d�Z�d�Z�d �„��Z �d �„��Z �d�„��Z�d�„��Z�d �„��Z �d�„��Z�d�„��Z�e�e�d�„�Z�e�e�d�„�Z�d�S(���s���Pseudo terminal utilities.(���s���selectNt���openptyt���forkt���spawni����i���i���c����������C���sO���y�t��i�ƒ��SWn�t�t�f�j �o�n�Xt�ƒ��\�}�}��t�|��ƒ�}�|�|�f�S(���sd���openpty() -> (master_fd, slave_fd) Open a pty master/slave pair, using os.openpty() if possible.N( ���t���osR����t���AttributeErrort���OSErrort���_open_terminalt ���master_fdt ���slave_namet ���slave_opent���slave_fd(���R���R���R ���(����(����t���/usr/lib/python2.4/pty.pyR�������s�����c����������C���s_���y�t��i�ƒ��\�}�}�Wn�t�t�f�j �o�n(�Xt��i�|�ƒ�}��t��i�|�ƒ�|�|��f�St �ƒ��S(���s›���master_open() -> (master_fd, slave_name) Open a pty master and return the fd, and the filename of the slave end. Deprecated, use openpty() instead.N( ���R���R����R���R ���R���R���t���ttynameR���t���closeR���(���R���R���R ���(����(����R���t���master_open!���s����� c����������C���sú���y �d�k��}�Wn�t�j �o�nR�Xy"�|�i�t�i�d�d�ƒ�\�}�}�Wn!�t�j �o�}�t�i �|�‚�n�X|�|�f�Sxt�d�D]l�}�xc�d�D][�}�d�|�|�}��y�t�i �|��t�i�ƒ�}�Wn�t�i �j �o �q‡�n�X|�d�|�|�f�Sq‡�Wqz�Wt�i �d�‚�d�S( ���sl���Open pty master and return (master_fd, tty_name). SGI and generic BSD version, for when openpty() fails.Ni¶��i����t���pqrstuvwxyzPQRSTt���0123456789abcdefs���/dev/ptys���/dev/ttys���out of pty devices(���t���sgit���ImportErrort���_getptyR���t���O_RDWRt���tty_nameR���t���IOErrort���msgt���errort���xt���yt���pty_namet���opent���fd(���R���R���R���R���R���R���R���R���(����(����R���R���1���s*����� " ��c���������C���s„���t��i�|��t��i�ƒ�}�y�d�k�l�}�l�}�Wn�t�j �o�|�Sn�Xy$�|�|�|�d�ƒ�|�|�|�d�ƒ�Wn�t �j �o�n�X|�S(���s©���slave_open(tty_name) -> slave_fd Open the pty slave and acquire the controlling terminal, returning opened filedescriptor. Deprecated, use openpty() instead.(���s���ioctls���I_PUSHt���ptemt���ldtermN( ���R���R���R���R���t���resultt���fcntlt���ioctlt���I_PUSHR���R���(���R���R"���R ���R#���(����(����R���R ���H���s����� c����������C���s��y�t��i�ƒ��\�}��}�Wn�t�t�f�j �o�nA�X|��t�j�o(�y�t��i�ƒ��Wqg�t�j �o�qg�Xn�|��|�f�St�ƒ��\�}�}�t��i�ƒ��}��|��t�j�oi�t��i�ƒ��t��i�|�ƒ�t��i �|�t�ƒ�t��i �|�t�ƒ�t��i �|�t�ƒ�|�t�j�o�t��i�|�ƒ�qn�|��|�f�S(���sd���fork() -> (pid, master_fd) Fork and make the child a session leader with a controlling terminal.N(���R���t���forkptyt���pidR���R���R���t���CHILDt���setsidR����R���R ���R���R ���t���dup2t���STDIN_FILENOt ���STDOUT_FILENOt ���STDERR_FILENO(���R%���R���R���R ���(����(����R���R���Z���s,����� c���������C���s5���x.�|�d�j�o �t�i�|��|�ƒ�}�|�|�}�q�Wd�S(���s#���Write all the data to a descriptor.t����N(���t���dataR���t���writeR���t���n(���R���R-���R/���(����(����R���t���_writen|���s ������ c���������C���s���t��i�|��d�ƒ�S(���s���Default read function.i���N(���R���t���readR���(���R���(����(����R���t���_read‚���s�����c���������C���s„���x}�t��|��t�g�g��g��ƒ�\�}�}�}�|��|�j�o �|�|��ƒ�}�t�i �t �|�ƒ�n�t�|�j�o�|�t�ƒ�}�t�|��|�ƒ�q�q�Wd�S(���s���Parent copy loop. Copies pty master -> standard output (master_read) standard input -> pty master (stdin_read)i���N( ���t���selectR���R)���t���rfdst���wfdst���xfdst���master_readR-���R���R.���R*���t ���stdin_readR0���(���R���R7���R8���R4���R5���R-���R6���(����(����R���t���_copy†���s�������! c���������C���s��t��|��ƒ�t��d�ƒ�j�o �|��f�}��n�t�ƒ��\�}�}�|�t�j�o�t�i�|��d�|��Œ�n�y&�t�i �t �ƒ�}�t�i�t �ƒ�d�}�Wn�t�i�j �o �d�}�n�Xy�t�|�|�|�ƒ�Wn:�t�t�f�j �o(�|�o�t�i�t �t�i�|�ƒ�qð�n�Xt�i�|�ƒ�d�S(���s���Create a spawned process.R,���i����i���N(���t���typet���argvR���R%���R���R&���R���t���execlpt���ttyt ���tcgetattrR)���t���modet���setrawt���restoreR���R9���R7���R8���R���R���t ���tcsetattrt ���TCSAFLUSHR ���(���R;���R7���R8���RA���R%���R?���R���(����(����R���R���•���s$����� (���t���__doc__R3���R���R=���t���__all__R)���R*���R+���R&���R����R���R���R ���R���R0���R2���R9���R���(���R���R���R=���R���R*���RE���R���R2���R����R+���R9���R3���R ���R&���R���R0���R)���(����(����R���t���?���s"��� "