Usually I can interrupt stuff with Ctrl+C, but sometimes when I'm using threads it doesn't work - example below.
Python 2.7.1+ (r271:86832, Apr 11 2011, 18:13:53)
[GCC 4.5.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import time
>>> time.sleep(100)
^CTraceback (most recent call last):
File "<stdin>", line 1, in <module>
K eyboardInterrupt
>>> import Queue
>>> q = Queue.Queue(maxsize=3)
>>> q.put(0)
>>> q.put(1)
>>> q.put(2)
>>> q.put(3)
^C^C^C^C^C^C^C^C
^C^C^C
^C^C
^C
@*#()#@#@$!!!!!
edit: Is there a way to get back to the interpreter? Solutions so far kill python completely and your existing namespace ..