Show More
@@ -541,11 +541,15 class ui(object): | |||
|
541 | 541 | # e.g. color extension on Windows |
|
542 | 542 | self.write(prompt) |
|
543 | 543 | |
|
544 |
# instead of trying to emulate raw_input, swap self.fin |
|
|
545 | old = sys.stdin | |
|
544 | # instead of trying to emulate raw_input, swap (self.fin, | |
|
545 | # self.fout) with (sys.stdin, sys.stdout) | |
|
546 | oldin = sys.stdin | |
|
547 | oldout = sys.stdout | |
|
546 | 548 | sys.stdin = self.fin |
|
549 | sys.stdout = self.fout | |
|
547 | 550 | line = raw_input(' ') |
|
548 | sys.stdin = old | |
|
551 | sys.stdin = oldin | |
|
552 | sys.stdout = oldout | |
|
549 | 553 | |
|
550 | 554 | # When stdin is in binary mode on Windows, it can cause |
|
551 | 555 | # raw_input() to emit an extra trailing carriage return |
General Comments 0
You need to be logged in to leave comments.
Login now