Show More
@@ -537,12 +537,15 b' class ui(object):' | |||
|
537 | 537 | except Exception: |
|
538 | 538 | pass |
|
539 | 539 | |
|
540 | # instead of trying to emulate raw_input, swap our in/out | |
|
541 | # with sys.stdin/out | |
|
542 | old = sys.stdout, sys.stdin | |
|
543 | sys.stdout, sys.stdin = self.fout, self.fin | |
|
544 | line = raw_input(prompt) | |
|
545 |
|
|
|
540 | # call write() so output goes through subclassed implementation | |
|
541 | # e.g. color extension on Windows | |
|
542 | self.write(prompt) | |
|
543 | ||
|
544 | # instead of trying to emulate raw_input, swap self.fin with sys.stdin | |
|
545 | old = sys.stdin | |
|
546 | sys.stdin = self.fin | |
|
547 | line = raw_input() | |
|
548 | sys.stdin = old | |
|
546 | 549 | |
|
547 | 550 | # When stdin is in binary mode on Windows, it can cause |
|
548 | 551 | # raw_input() to emit an extra trailing carriage return |
General Comments 0
You need to be logged in to leave comments.
Login now