The remote procedure call module rpc.py can now access data attributes of
authorKurt B. Kaiser <kbk@shore.net>
Tue, 21 Dec 2004 22:10:32 +0000 (22:10 +0000)
committerKurt B. Kaiser <kbk@shore.net>
Tue, 21 Dec 2004 22:10:32 +0000 (22:10 +0000)
remote registered objects.  Changes to these attributes are local, however.

M EditorWindow.py
M NEWS.txt
M PyShell.py
M idlever.py
M rpc.py
M run.py

Lib/idlelib/EditorWindow.py
Lib/idlelib/NEWS.txt
Lib/idlelib/PyShell.py
Lib/idlelib/idlever.py
Lib/idlelib/rpc.py
Lib/idlelib/run.py

index 5d639913aa272a887aa1b0391c0b0520f9a86b89..4015c9eea610dc8a81e04a59dee0c16520f2fac8 100644 (file)
@@ -37,7 +37,7 @@ def _find_module(fullname, path=None):
             raise ImportError, 'No source for module ' + module.__name__
     return file, filename, descr
 
-class EditorWindow:
+class EditorWindow(object):
     from Percolator import Percolator
     from ColorDelegator import ColorDelegator
     from UndoDelegator import UndoDelegator
@@ -1297,7 +1297,7 @@ import tokenize
 _tokenize = tokenize
 del tokenize
 
-class IndentSearcher:
+class IndentSearcher(object):
 
     # .run() chews over the Text widget, looking for a block opener
     # and the stmt following it.  Returns a pair,
index 6337e7ca85009637a92ab55b55426d33501aa57b..1e12ca9c6a1fc64910f7bc33153edb721a18b92a 100644 (file)
@@ -1,3 +1,11 @@
+What's New in IDLE 1.2a0?
+=======================
+
+*Release date: XX-XXX-2005*
+
+- The remote procedure call module rpc.py can now access data attributes of
+  remote registered objects.  Changes to these attributes are local, however.
+
 What's New in IDLE 1.1?
 =======================
 
index 887d63804c4fa4e0d8f5833e182cfde50097d68b..fae61308494f9d7540fe558c9eb1abf8a192ab98 100644 (file)
@@ -1186,7 +1186,7 @@ class PyShell(OutputWindow):
             if not use_subprocess:
                 raise KeyboardInterrupt
 
-class PseudoFile:
+class PseudoFile(object):
 
     def __init__(self, shell, tags, encoding=None):
         self.shell = shell
index aba89af82a9b7ffee928d4e413f99f734ca0e46b..eef2885f461c4fe3d3d547dc481bdfa94f305901 100644 (file)
@@ -1 +1 @@
-IDLE_VERSION = "1.1"
+IDLE_VERSION = "1.2a0"
index d097f9b100a32e975338608610842fbc44ec37f3..16200632989c7fc23fb1ad7bff9fa0588295b2b7 100644 (file)
@@ -121,7 +121,7 @@ request_queue = Queue.Queue(0)
 response_queue = Queue.Queue(0)
 
 
-class SocketIO:
+class SocketIO(object):
 
     nextseq = 0
 
@@ -475,7 +475,7 @@ class SocketIO:
 
 #----------------- end class SocketIO --------------------
 
-class RemoteObject:
+class RemoteObject(object):
     # Token mix-in class
     pass
 
@@ -484,7 +484,7 @@ def remoteref(obj):
     objecttable[oid] = obj
     return RemoteProxy(oid)
 
-class RemoteProxy:
+class RemoteProxy(object):
 
     def __init__(self, oid):
         self.oid = oid
@@ -533,7 +533,7 @@ class RPCClient(SocketIO):
     def get_remote_proxy(self, oid):
         return RPCProxy(self, oid)
 
-class RPCProxy:
+class RPCProxy(object):
 
     __methods = None
     __attributes = None
@@ -549,7 +549,11 @@ class RPCProxy:
             return MethodProxy(self.sockio, self.oid, name)
         if self.__attributes is None:
             self.__getattributes()
-        if not self.__attributes.has_key(name):
+        if self.__attributes.has_key(name):
+            value = self.sockio.remotecall(self.oid, '__getattribute__',
+                                           (name,), {})
+            return value
+        else:
             raise AttributeError, name
 
     def __getattributes(self):
@@ -579,7 +583,7 @@ def _getattributes(obj, attributes):
         if not callable(attr):
             attributes[name] = 1
 
-class MethodProxy:
+class MethodProxy(object):
 
     def __init__(self, sockio, oid, name):
         self.sockio = sockio
index 90a46922c6e86e0d8b4a0ad54f018e9afd67ba81..62f4ccea29262d6088bfd5b7f88ec6ca2264a254 100644 (file)
@@ -270,7 +270,7 @@ class MyHandler(rpc.RPCHandler):
         thread.interrupt_main()
 
 
-class Executive:
+class Executive(object):
 
     def __init__(self, rpchandler):
         self.rpchandler = rpchandler