proxy(...) first. This will only work on modules that import socket directly into the namespace; most of the Python Standard Library falls into this category. N)