We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5e24f65 commit 328fd7bCopy full SHA for 328fd7b
1 file changed
bpython/cli.py
@@ -38,6 +38,8 @@
38
import termios
39
import fcntl
40
import unicodedata
41
+import errno
42
+
43
from itertools import takewhile
44
from locale import LC_ALL, getpreferredencoding, setlocale
45
from optparse import OptionParser
@@ -103,6 +105,11 @@ def __init__(self, interface):
103
105
def __iter__(self):
104
106
return iter(self.readlines())
107
108
+ def write(self, value):
109
+ # XXX IPython expects sys.stdin.write to exist, there will no doubt be
110
+ # others, so here's a hack to keep them happy
111
+ raise IOError(errno.EBADF, "sys.stdin is read-only")
112
113
def isatty(self):
114
return True
115
0 commit comments