MCPcopy Index your code
hub / github.com/bpython/bpython / write

Method write

bpython/urwid.py:911–927  ·  view source on GitHub ↗

For overriding stdout defaults

(self, s)

Source from the content-addressed store, hash-verified

909 # ^-- That's how simple this method was at first :(
910
911 def write(self, s):
912 """For overriding stdout defaults"""
913 if "\x04" in s:
914 for block in s.split("\x04"):
915 self.write(block)
916 return
917 if s.rstrip() and "\x03" in s:
918 t = s.split("\x03")[1]
919 else:
920 t = s
921
922 if not self.stdout_hist:
923 self.stdout_hist = t
924 else:
925 self.stdout_hist += t
926
927 self.echo(s)
928
929 def push(self, s, insert_into_history=True):
930 # Restore the original SIGINT handler. This is needed to be able

Callers 14

setup.pyFile · 0.45
__init__Method · 0.45
mainFunction · 0.45
startFunction · 0.45
writetbMethod · 0.45
write2fileMethod · 0.45
edit_configMethod · 0.45
save_toMethod · 0.45
formatMethod · 0.45
pasteMethod · 0.45
page_internalFunction · 0.45

Calls 1

echoMethod · 0.95

Tested by

no test coverage detected