Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(804)

Delta Between Two Patch Sets: Lib/idlelib/run.py

Issue 13532: In IDLE, sys.stdout.write and sys.stderr can write any pickleable object
Left Patch Set: Created 1 year, 2 months ago
Right Patch Set: Created 10 months, 1 week ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Right: Side by side diff | Download
« no previous file with change/comment | « no previous file | no next file » | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
(no file at all)
1 import sys 1 import sys
2 import io 2 import io
3 import linecache 3 import linecache
4 import time 4 import time
5 import socket 5 import socket
6 import traceback 6 import traceback
7 import _thread as thread 7 import _thread as thread
8 import threading 8 import threading
9 import queue 9 import queue
10 import tkinter 10 import tkinter
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 return getattr(self.rpc, name) 269 return getattr(self.rpc, name)
270 270
271 def __setattr__(self, name, value): 271 def __setattr__(self, name, value):
272 return setattr(self.rpc, name, value) 272 return setattr(self.rpc, name, value)
273 273
274 def write(self, s): 274 def write(self, s):
275 if not isinstance(s, str): 275 if not isinstance(s, str):
276 raise TypeError('must be str, not ' + type(s).__name__) 276 raise TypeError('must be str, not ' + type(s).__name__)
277 return self.rpc.write(s) 277 return self.rpc.write(s)
278 278
279 def readline(self):
280 return self.rpc.readline()
281
282 def isatty(self):
283 return self.rpc.isatty()
284
279 class MyHandler(rpc.RPCHandler): 285 class MyHandler(rpc.RPCHandler):
280 286
281 def handle(self): 287 def handle(self):
282 """Override base method""" 288 """Override base method"""
283 executive = Executive(self) 289 executive = Executive(self)
284 self.register("exec", executive) 290 self.register("exec", executive)
285 sys.stdin = self.console = _RPCFile(self.get_remote_proxy("stdin")) 291 sys.stdin = self.console = _RPCFile(self.get_remote_proxy("stdin"))
286 sys.stdout = _RPCFile(self.get_remote_proxy("stdout")) 292 sys.stdout = _RPCFile(self.get_remote_proxy("stdout"))
287 sys.stderr = _RPCFile(self.get_remote_proxy("stderr")) 293 sys.stderr = _RPCFile(self.get_remote_proxy("stderr"))
288 sys.displayhook = rpc.displayhook 294 sys.displayhook = rpc.displayhook
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
365 return None 371 return None
366 flist = None 372 flist = None
367 if flist_oid is not None: 373 if flist_oid is not None:
368 flist = self.rpchandler.get_remote_proxy(flist_oid) 374 flist = self.rpchandler.get_remote_proxy(flist_oid)
369 while tb and tb.tb_frame.f_globals["__name__"] in ["rpc", "run"]: 375 while tb and tb.tb_frame.f_globals["__name__"] in ["rpc", "run"]:
370 tb = tb.tb_next 376 tb = tb.tb_next
371 sys.last_type = typ 377 sys.last_type = typ
372 sys.last_value = val 378 sys.last_value = val
373 item = StackViewer.StackTreeItem(flist, tb) 379 item = StackViewer.StackTreeItem(flist, tb)
374 return RemoteObjectBrowser.remote_object_tree_item(item) 380 return RemoteObjectBrowser.remote_object_tree_item(item)
LEFTRIGHT
« no previous file | no next file » | Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Toggle Comments ('s')

RSS Feeds Recent Issues | This issue
This is Rietveld cbc36f91f3f7