()
| 10 | |
| 11 | # Prints prompt and reads lines from stdin. |
| 12 | def readLinesFromStdin(): |
| 13 | if tn_globals.IsInteractive: |
| 14 | while True: |
| 15 | try: |
| 16 | line = tn_globals.Prompt.prompt() |
| 17 | yield line |
| 18 | except EOFError as e: |
| 19 | # Ctrl+D. |
| 20 | break |
| 21 | else: |
| 22 | # iter(...) is a workaround for a python2 bug https://bugs.python.org/issue3907 |
| 23 | for cmd in iter(sys.stdin.readline, ''): |
| 24 | yield cmd |
| 25 | |
| 26 | |
| 27 | # Stdin reads a possibly multiline input from stdin and queues it for asynchronous processing. |
no outgoing calls
no test coverage detected
searching dependent graphs…