<s> """<STR_LIT>""" <EOL> from __future__ import absolute_import <EOL> from __future__ import print_function <EOL> from __future__ import division <EOL> import os <EOL> class UrxvtIO ( object ) : <EOL> def __init__ ( self ) : <EOL> masterfd , slavefd = os . openpty ( ) <EOL> pid = os . fork ( ) <EOL> if pid : <EOL> os . close ( masterfd ) <EOL> self . _fo = os . fdopen ( slavefd , "<STR_LIT>" , <NUM_LIT:0> ) <EOL> else : <EOL> os . close ( slavefd ) <EOL> os . execlp ( "<STR_LIT>" , "<STR_LIT>" , "<STR_LIT>" , str ( masterfd ) ) <EOL> self . mode = "<STR_LIT>" <EOL> self . closed = <NUM_LIT:0> <EOL> self . softspace = <NUM_LIT:0> <EOL> self . read = self . _fo . read <EOL> self . readline = self . _fo . readline <EOL> self . readlines = self . _fo . readlines <EOL> self . write = self . _fo . write <EOL> self . flush = self . _fo . flush <EOL> self . writelines = self . _fo . writelines <EOL> def raw_input ( self , prompt = "<STR_LIT>" ) : <EOL> self . _fo . write ( prompt ) <EOL> return self . _fo . readline ( ) [ : - <NUM_LIT:1> ] <EOL> def close ( self ) : <EOL> if self . _fo is not None : <EOL> self . closed = <NUM_LIT:1> <EOL> self . _fo . close ( ) <EOL> self . _fo = None <EOL> self . read = None <EOL> self . readline = None <EOL> self . readlines = None <EOL> self . write = None <EOL> self . flush = None <EOL> self . writelines = None <EOL> def fileno ( self ) : <EOL> return self . _fo . fileno ( ) <EOL> def isatty ( self ) : <EOL> return self . _fo . isatty ( ) <EOL> def errlog ( self , text ) : <EOL> self . _fo . write ( "<STR_LIT>" % ( text , ) ) <EOL> self . _fo . flush ( ) <EOL> def _test ( argv ) : <EOL> import time <EOL> io = UrxvtIO ( ) <EOL> inp = io . raw_input ( "<STR_LIT>" ) <EOL> io . write ( inp + "<STR_LIT:\n>" ) <EOL> io . write ( "<STR_LIT>" ) <EOL> time . sleep ( <NUM_LIT:5> ) <EOL> io . close ( ) <EOL> if __name__ == "<STR_LIT:__main__>" : <EOL> import sys <EOL> _test ( sys . argv ) </s>
