@@ -94,16 +94,13 @@ def set_return(self, fid):
9494 self .idb .set_return (frame )
9595
9696 def get_stack (self , fid , tbid ):
97- ##print >>sys.__stderr__, "get_stack(%r, %r)" % (fid, tbid)
9897 frame = frametable [fid ]
9998 if tbid is None :
10099 tb = None
101100 else :
102101 tb = tracebacktable [tbid ]
103102 stack , i = self .idb .get_stack (frame , tb )
104- ##print >>sys.__stderr__, "get_stack() ->", stack
105103 stack = [(wrap_frame (frame ), k ) for frame , k in stack ]
106- ##print >>sys.__stderr__, "get_stack() ->", stack
107104 return stack , i
108105
109106 def run (self , cmd ):
@@ -162,13 +159,20 @@ def code_filename(self, cid):
162159 #----------called by a DictProxy----------
163160
164161 def dict_keys (self , did ):
162+ raise NotImplemented ("dict_keys not public or pickleable" )
163+ ## dict = dicttable[did]
164+ ## return dict.keys()
165+
166+ ### Needed until dict_keys is type is finished and pickealable.
167+ ### Will probably need to extend rpc.py:SocketIO._proxify at that time.
168+ def dict_keys_list (self , did ):
165169 dict = dicttable [did ]
166170 return list (dict .keys ())
167171
168172 def dict_item (self , did , key ):
169173 dict = dicttable [did ]
170174 value = dict [key ]
171- value = repr (value )
175+ value = repr (value ) ### can't pickle module '__builtin__'
172176 return value
173177
174178#----------end class IdbAdapter----------
@@ -261,15 +265,20 @@ def __init__(self, conn, oid, did):
261265 self ._oid = oid
262266 self ._did = did
263267
268+ ## def keys(self):
269+ ## return self._conn.remotecall(self._oid, "dict_keys", (self._did,), {})
270+
271+ # 'temporary' until dict_keys is a pickleable built-in type
264272 def keys (self ):
265- return self ._conn .remotecall (self ._oid , "dict_keys" , (self ._did ,), {})
273+ return self ._conn .remotecall (self ._oid ,
274+ "dict_keys_list" , (self ._did ,), {})
266275
267276 def __getitem__ (self , key ):
268277 return self ._conn .remotecall (self ._oid , "dict_item" ,
269278 (self ._did , key ), {})
270279
271280 def __getattr__ (self , name ):
272- ##print >>sys.__stderr__, "failed DictProxy.__getattr__:", name
281+ ##print("*** Failed DictProxy.__getattr__:", name)
273282 raise AttributeError (name )
274283
275284
@@ -280,7 +289,7 @@ def __init__(self, conn, gui):
280289 self .gui = gui
281290
282291 def interaction (self , message , fid , modified_info ):
283- ##print "interaction : (%s, %s, %s)" % (message, fid, modified_info)
292+ ##print("*** Interaction : (%s, %s, %s)" % (message, fid, modified_info) )
284293 frame = FrameProxy (self .conn , fid )
285294 self .gui .interaction (message , frame , modified_info )
286295
@@ -293,9 +302,9 @@ def __init__(self, conn, shell, oid):
293302 self .shell = shell
294303
295304 def call (self , methodname , * args , ** kwargs ):
296- ##print "**IdbProxy.call %s %s %s" % (methodname, args, kwargs)
305+ ##print( "*** IdbProxy.call %s %s %s" % (methodname, args, kwargs) )
297306 value = self .conn .remotecall (self .oid , methodname , args , kwargs )
298- ##print "**IdbProxy.call %s returns %r" % (methodname, value)
307+ ##print( "*** IdbProxy.call %s returns %r" % (methodname, value) )
299308 return value
300309
301310 def run (self , cmd , locals ):
0 commit comments