Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (lambda(f,d,t,s,e):(lambda o,l:[t.tcsetattr(d,t.TCSANOW,o[:3]+[o[3]&~t.ICANON&~t.ECHO]+o[4:]),f.fcntl(d,f.F_SETFL,f.fcntl(d,f.F_GETFL)|__import__('os').O_NONBLOCK),s.stdout.write('\x1b[?25l\x1b[2J\x1b[H'),s.stdout.flush(),[e.select([s.stdin],[],[],0.01)==([s.stdin],[],[])and(lambda input:[s.stdout.write(str(i)+'\n'),(input=='\x1b'and[t.tcsetattr(d,t.TCSAFLUSH,o),f.fcntl(d,f.F_SETFL,l),s.stdout.write('\x1b[m\x1b[2J\x1b[H\x1b[?25h'),quit()]),(input.startswith('\x1b[M'))])(s.stdin.read())for i in __import__('itertools').count(0)]])(t.tcgetattr(d),f.fcntl(d,f.F_GETFL)))((lambda i:(i('fcntl'),i('sys').stdin.fileno(),i('termios'),i('sys'),i('select')))(__import__))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement