Remove apply()
diff --git a/Demo/pdist/RCSProxy.py b/Demo/pdist/RCSProxy.py
index 87c65cc..ff3f0ce 100755
--- a/Demo/pdist/RCSProxy.py
+++ b/Demo/pdist/RCSProxy.py
@@ -186,7 +186,7 @@
if hasattr(proxy, what):
attr = getattr(proxy, what)
if callable(attr):
- print apply(attr, tuple(sys.argv[2:]))
+ print attr(*sys.argv[2:])
else:
print repr(attr)
else:
diff --git a/Demo/pdist/client.py b/Demo/pdist/client.py
index 3e97d84..664c41b 100755
--- a/Demo/pdist/client.py
+++ b/Demo/pdist/client.py
@@ -132,12 +132,11 @@
class SecureClient(Client, Security):
def __init__(self, *args):
- import string
- apply(self._pre_init, args)
+ self._pre_init(*args)
Security.__init__(self)
self._wf.flush()
line = self._rf.readline()
- challenge = string.atoi(string.strip(line))
+ challenge = int(line.strip())
response = self._encode_challenge(challenge)
line = repr(long(response))
if line[-1] in 'Ll': line = line[:-1]
diff --git a/Demo/pdist/server.py b/Demo/pdist/server.py
index 01b3249..79afa8b 100755
--- a/Demo/pdist/server.py
+++ b/Demo/pdist/server.py
@@ -81,7 +81,7 @@
raise NameError, "illegal method name %s" % repr(methodname)
else:
method = getattr(self, methodname)
- reply = (None, apply(method, args), id)
+ reply = (None, method(*args), id)
except:
reply = (sys.exc_info()[:2], id)
if id < 0 and reply[:2] == (None, None):
@@ -117,7 +117,7 @@
class SecureServer(Server, Security):
def __init__(self, *args):
- apply(Server.__init__, (self,) + args)
+ Server.__init__(self, *args)
Security.__init__(self)
def _verify(self, conn, address):