Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/ShExBy/shex_roo.../lib64/python2..../idlelib
File: RemoteObjectBrowser.py
from idlelib import rpc
[0] Fix | Delete
[1] Fix | Delete
def remote_object_tree_item(item):
[2] Fix | Delete
wrapper = WrappedObjectTreeItem(item)
[3] Fix | Delete
oid = id(wrapper)
[4] Fix | Delete
rpc.objecttable[oid] = wrapper
[5] Fix | Delete
return oid
[6] Fix | Delete
[7] Fix | Delete
class WrappedObjectTreeItem:
[8] Fix | Delete
# Lives in PYTHON subprocess
[9] Fix | Delete
[10] Fix | Delete
def __init__(self, item):
[11] Fix | Delete
self.__item = item
[12] Fix | Delete
[13] Fix | Delete
def __getattr__(self, name):
[14] Fix | Delete
value = getattr(self.__item, name)
[15] Fix | Delete
return value
[16] Fix | Delete
[17] Fix | Delete
def _GetSubList(self):
[18] Fix | Delete
list = self.__item._GetSubList()
[19] Fix | Delete
return map(remote_object_tree_item, list)
[20] Fix | Delete
[21] Fix | Delete
class StubObjectTreeItem:
[22] Fix | Delete
# Lives in IDLE process
[23] Fix | Delete
[24] Fix | Delete
def __init__(self, sockio, oid):
[25] Fix | Delete
self.sockio = sockio
[26] Fix | Delete
self.oid = oid
[27] Fix | Delete
[28] Fix | Delete
def __getattr__(self, name):
[29] Fix | Delete
value = rpc.MethodProxy(self.sockio, self.oid, name)
[30] Fix | Delete
return value
[31] Fix | Delete
[32] Fix | Delete
def _GetSubList(self):
[33] Fix | Delete
list = self.sockio.remotecall(self.oid, "_GetSubList", (), {})
[34] Fix | Delete
return [StubObjectTreeItem(self.sockio, oid) for oid in list]
[35] Fix | Delete
[36] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function