idlelib.run
index
/usr/local/lib/python2.3/idlelib/run.py

 
Modules
       
idlelib.CallTips
Queue
idlelib.RemoteDebugger
idlelib.RemoteObjectBrowser
idlelib.StackViewer
__main__
os
idlelib.rpc
socket
sys
thread
threading
time
traceback

 
Classes
       
Executive
idlelib.rpc.RPCHandler(SocketServer.BaseRequestHandler, idlelib.rpc.SocketIO)
MyHandler
idlelib.rpc.RPCServer(SocketServer.TCPServer)
MyRPCServer

 
class Executive
     Methods defined here:
__init__(self, rpchandler)
get_the_calltip(self, name)
interrupt_the_server(self)
runcode(self, code)
stackviewer(self, flist_oid=None)
start_the_debugger(self, gui_adap_oid)
stop_the_debugger(self, idb_adap_oid)
Unregister the Idb Adapter.  Link objects and Idb then subject to GC

 
class MyHandler(idlelib.rpc.RPCHandler)
    
Method resolution order:
MyHandler
idlelib.rpc.RPCHandler
SocketServer.BaseRequestHandler
idlelib.rpc.SocketIO

Methods defined here:
EOFhook(self)
Override SocketIO method - terminate wait on callback and exit thread
decode_interrupthook(self)
interrupt awakened thread
exithook(self)
override SocketIO method - wait for MainThread to shut us down
handle(self)
Override base method

Methods inherited from idlelib.rpc.RPCHandler:
__init__(self, sock, addr, svr)
get_remote_proxy(self, oid)

Data and other attributes inherited from idlelib.rpc.RPCHandler:
debugging = False
location = '#S'

Methods inherited from SocketServer.BaseRequestHandler:
finish(self)
setup(self)

Methods inherited from idlelib.rpc.SocketIO:
asynccall(self, oid, methodname, args, kwargs)
asyncqueue(self, oid, methodname, args, kwargs)
asyncreturn(self, seq)
close(self)
debug(self, *args)
decoderesponse(self, response)
getresponse(self, myseq, wait)
handle_EOF(self)
action taken upon link being closed by peer
ioready(self, wait)
localcall(self, seq, request)
mainloop(self)
Listen on socket until I/O not ready or EOF
 
pollresponse() will loop looking for seq number None, which
never comes, and exit on EOFError.
newseq(self)
pollmessage(self, wait)
pollpacket(self, wait)
pollresponse(self, myseq, wait)
Handle messages received on the socket.
 
Some messages received may be asynchronous 'call' or 'queue' requests,
and some may be responses for other threads.
 
'call' requests are passed to localcall() with the expectation of
immediate execution, during which time the socket is not serviced.
 
'queue' requests are used for tasks (which may block or hang) to be
processed in a different thread.  These requests are fed into
request_queue by localcall().  Responses to queued requests are
taken from response_queue and sent across the link with the associated
sequence numbers.  Messages in the queues are (sequence_number,
request/response) tuples and code using this module removing messages
from the request_queue is responsible for returning the correct
sequence number in the response_queue.
 
pollresponse() will loop until a response message with the myseq
sequence number is received, and will save other responses in
self.responses and notify the owning thread.
putmessage(self, message)
register(self, oid, object)
remotecall(self, oid, methodname, args, kwargs)
remotequeue(self, oid, methodname, args, kwargs)
unregister(self, oid)

Data and other attributes inherited from idlelib.rpc.SocketIO:
buffer = ''
bufneed = 4
bufstate = 0
nextseq = 0

 
class MyRPCServer(idlelib.rpc.RPCServer)
    
Method resolution order:
MyRPCServer
idlelib.rpc.RPCServer
SocketServer.TCPServer
SocketServer.BaseServer

Methods defined here:
handle_error(self, request, client_address)
Override RPCServer method for IDLE
 
Interrupt the MainThread and exit server if link is dropped.

Methods inherited from idlelib.rpc.RPCServer:
__init__(self, addr, handlerclass=None)
get_request(self)
Override TCPServer method, return already connected socket
server_activate(self)
Override TCPServer method, connect() instead of listen()
 
Due to the reversed connection, self.server_address is actually the
address of the Idle Client to which we are connecting.
server_bind(self)
Override TCPServer method, no bind() phase for connecting entity

Methods inherited from SocketServer.TCPServer:
close_request(self, request)
Called to clean up an individual request.
fileno(self)
Return socket file number.
 
Interface required by select().
server_close(self)
Called to clean-up the server.
 
May be overridden.

Data and other attributes inherited from SocketServer.TCPServer:
address_family = 2
allow_reuse_address = False
request_queue_size = 5
socket_type = 1

Methods inherited from SocketServer.BaseServer:
finish_request(self, request, client_address)
Finish one request by instantiating RequestHandlerClass.
handle_request(self)
Handle one request, possibly blocking.
process_request(self, request, client_address)
Call finish_request.
 
Overridden by ForkingMixIn and ThreadingMixIn.
serve_forever(self)
Handle one request at a time until doomsday.
verify_request(self, request, client_address)
Verify the request.  May be overridden.
 
Return True if we should proceed with this request.

 
Functions
       
cleanup_traceback(tb, exclude)
Remove excluded traces from beginning/end of tb; get cached lines
exit()
Exit subprocess, possibly after first deleting sys.exitfunc
 
If config-main.cfg/.def 'General' 'delete-exitfunc' is True, then any
sys.exitfunc will be removed before exiting.  (VPython support)
flush_stdout()
main(del_exitfunc=False)
Start the Python execution server in a subprocess
 
In the Python subprocess, RPCServer is instantiated with handlerclass
MyHandler, which inherits register/unregister methods from RPCHandler via
the mix-in class SocketIO.
 
When the RPCServer 'server' is instantiated, the TCPServer initialization
creates an instance of run.MyHandler and calls its handle() method.
handle() instantiates a run.Executive object, passing it a reference to the
MyHandler object.  That reference is saved as attribute rpchandler of the
Executive instance.  The Executive methods have access to the reference and
can pass it on to entities that they command
(e.g. RemoteDebugger.Debugger.start_debugger()).  The latter, in turn, can
call MyHandler(SocketIO) register/unregister methods via the reference to
register and unregister themselves.
manage_socket(address)
print_exception()

 
Data
        LOCALHOST = '127.0.0.1'
exit_now = False
quitting = False