>From the post I gather that you are looking for a solution under Linux. I don't know much linux, but under Windows you could patch the IAT (import address table) of the running process temporarly to redirect calls to the socket winsock api to a stup function, which simply fails. If you are interested, drop me a letter.
-- http://mail.python.org/mailman/listinfo/python-list