If you're using os.system to run a command (such as xterm running man) and you get "broken pipe" errors, you can restore standard pipe functionality with the signal module:
import signal signal.signal(signal.SIGPIPE, signal.SIG_DFL) # Call os.system after calling signal.signal.
Note: information taken from http://monkeyfingers.org/ (page now unavailable).
brokenlanguagesospipeprogrammingpythonsignalsystemunix