import code class Console(code.InteractiveConsole): EOF_key_sequence = '-' def __init__(self, stdin, stdout, locals=None, filename="<console>"): self.stdin = stdin self.stdout = stdout code.InteractiveConsole.__init__(self, locals, filename) def raw_input(self, prompt=""): """Write a prompt and read a line. The returned line does not include the trailing newline. When the user enters the EOF key sequence, EOFError is raised. """ self.write(prompt) line = self.stdin.readline() if not line: raise EOFError line = line.rstrip() if line == self.EOF_key_sequence: raise EOFError else: return line def write(self, data): self.stdout.write(data) self.stdout.flush()
Name | Type | Size | Permission | Actions |
---|---|---|---|---|
__pycache__ | Folder | 0755 |
|
|
test | Folder | 0755 |
|
|
Classifiers.py | File | 45.16 KB | 0644 |
|
Console.py | File | 843 B | 0644 |
|
Doc.py | File | 7.81 KB | 0644 |
|
ImpSet.py | File | 870 B | 0644 |
|
Monitor.py | File | 14.5 KB | 0644 |
|
OutputHandling.py | File | 11.52 KB | 0644 |
|
Part.py | File | 23.25 KB | 0644 |
|
Path.py | File | 14.19 KB | 0644 |
|
Prof.py | File | 90.38 KB | 0644 |
|
RM.py | File | 119 B | 0644 |
|
RefPat.py | File | 18.18 KB | 0644 |
|
Remote.py | File | 15.31 KB | 0644 |
|
RemoteConstants.py | File | 209 B | 0644 |
|
Spec.py | File | 48.59 KB | 0644 |
|
Target.py | File | 205 B | 0644 |
|
UniSet.py | File | 66.5 KB | 0644 |
|
Use.py | File | 23.05 KB | 0644 |
|
View.py | File | 19.05 KB | 0644 |
|
__init__.py | File | 209 B | 0644 |
|
heapyc.cpython-311-x86_64-linux-gnu.so | File | 154.55 KB | 0755 |
|
pbhelp.py | File | 17.4 KB | 0644 |
|