(self,data)
| 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', |
no outgoing calls