From The Compiler, 6 Years ago, written in Plain Text.
Embed
  1. florian@ginny ~ % python
  2. Python 3.2.3 (default, Apr 23 2012, 23:14:44)
  3. [GCC 4.7.0 20120414 (prerelease)] on linux2
  4. Type "help", "copyright", "credits" or "license" for more information.
  5. >>> import socket
  6. >>> sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
  7. >>> sock.settimeout(1)
  8. >>> sock.connect(('mudkip.iotairc.net', 6667))
  9. Traceback (most recent call last):
  10.   File "<stdin>", line 1, in <module>
  11. socket.error: [Errno 111] Connection refused