comparison sh-replay @ 6:15620df00023 draft

Require to hit enter at the end of each command to actually execute it
author Jordi Gutiérrez Hermoso <jordigh@octave.org>
date Wed, 25 Sep 2013 14:01:28 -0400
parents f5a63edf4c98
children 1fb152119488
comparison
equal deleted inserted replaced
5:f5a63edf4c98 6:15620df00023
86 f.write(cmd + "\n") 86 f.write(cmd + "\n")
87 f.flush() 87 f.flush()
88 88
89 subprocess.call(["/bin/bash", "-l", "/tmp/cmd"]) 89 subprocess.call(["/bin/bash", "-l", "/tmp/cmd"])
90 90
91 while True:
92 key = getch()
93 if ord(key) == 13:
94 sys.stdout.write("\n")
95 sys.stdout.flush()
96 break
91 if __name__ == "__main__": 97 if __name__ == "__main__":
92 main() 98 main()
93 99