MCPcopy Create free account
hub / github.com/ipython/ipython / write

Method write

IPython/utils/io.py:51–65  ·  view source on GitHub ↗
(self,data)

Source from the content-addressed store, hash-verified

49 return tpl.format(mod=cls.__module__, cls=cls.__name__, args=self.stream)
50
51 def write(self,data):
52 warn('IOStream is deprecated since IPython 5.0, use sys.{stdin,stdout,stderr} instead',
53 DeprecationWarning, stacklevel=2)
54 try:
55 self._swrite(data)
56 except:
57 try:
58 # print handles some unicode issues which may trip a plain
59 # write() call. Emulate write() by using an empty end
60 # argument.
61 print(data, end='', file=self.stream)
62 except:
63 # if we get here, something is seriously broken.
64 print('ERROR - failed to write data to stream:', self.stream,
65 file=sys.stderr)
66
67 def writelines(self, lines):
68 warn('IOStream is deprecated since IPython 5.0, use sys.{stdin,stdout,stderr} instead',

Callers 2

writelinesMethod · 0.95
test_IOStream_initMethod · 0.95

Calls

no outgoing calls

Tested by 1

test_IOStream_initMethod · 0.76