Python 3.3, Windows operating system: I am communicating with a device using a Python script and I am coding except clauses in my send and receive functions to handle a particular error. I can't find a WinError example, and I can't get the syntax right. I have researched this and tried the following:
while not_sent: try: (my socket send code) except OSError.WinError.10057 (this failed) except OSError.WSAENOTCONN (this failed) except OSError.winerror.WSANOTCONN (this failed) I have another general except/as clause already coded and debugged for each function to catch unexpected errors and shut down. I need to catch and handle 10057 exceptions when they occur and keep running. I know 10057 is a WinError, which is a subset of OSError, I just can't find the right syntax for it. I would appreciate some help on this one. Thank you.
_______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor