SocketServer, handle(), and scope

Foo J. Bar foobar at
Sat Feb 5 22:12:20 EST 2000

I'm using the SocketServer module for a
a ThreadingTCPServer.  I created a
new class that had an override for the
handle function. This all works fine
and my client does indeed connect to and
send messages to the server without any
problems.  However, my problem is that
my program is running a fairy large application
where the user has an interactive session
with the Python interpreter.  He/she types:

# contains a fairly large class Bar

import foo,time

a = foo.Bar()

a.rate = 30

def doit():
  while 1:

# contains a class that 
# overrides the handle function

import SocketServer,thread
from myhandler import Myhandler



I need to be able to change this value ('a.rate') from 
a remote workstation (hense the need for my application to
run a server (SocketServer). 

How should I do this?  How does one design (or use) the
handle function (or Myhandle class) so that information
can be shared between classes (or changed in the scope 
the user is running in).

Any advice (or pointers to existing code) would be
greatly appreciated.


More information about the Python-list mailing list