The PythonWin debugger hangs!

Stephen French sos at interact.net.au
Sun Mar 19 12:30:12 EST 2000


Hi there Python-practitioners,

   I'm new to Python, and it looks great, but unfortunately I've gotten
stuck trying to use the PythonWin debugger (build 128 of PythonWin).  I've
written a simple TCP/IP Python program, here's the source:


from SocketServer import BaseRequestHandler, StreamRequestHandler, TCPServer

class MyRequestHandler(StreamRequestHandler, BaseRequestHandler):
    def handle(self):
        self.wfile.write("Hello world!\n")

server_address = ('', 8001)
my_server = TCPServer(server_address, MyRequestHandler)
my_server.handle_request()


   Initially I was having some problems with it (I realised right after I
started writing this message that I had the two base classes in the wrong
order) and so I was trying to debug it.  But the problem is that whenever I
tried stepping through, at some point during the handling of the new
connection, the debugger would stop responding to input.  It didn't actually
freeze, but if I clicked anywhere in the debugger, it just beeped, and it
seemed to ignore most (but not all) keypresses.  It was almost as if there
was a modal dialog being displayed (only there wasn't one!).  Even weirder
is that when I used Alt-Tab to switch applications, PythonWin was no longer
in the list of applications!  Of course I have now found my bug, but this
debugging problem hasn't gone away.

   Anyone know what is going on here?  The PythonWin debugger otherwise
looks pretty good!  I've had this problem with both Win98 and Win2000.  All
I have to do is set a breakpoint on the "self.wfile.write(...)" line and
when the code reaches there, press F10, and then it's toast...

Stephen.






More information about the Python-list mailing list