I have a python script that reads stdin via a pipe, and I cannot seem to use it with pdb.set_trace().
my_script.py:
#!/usr/bin/env python
import sy
You may want to look at how the Celery RDB (Remote Debugger) contrib module works:
https://github.com/celery/celery/blob/master/celery/contrib/rdb.py
It seems to involve a lot of stream processing, but I have tested it, and it works by allowing you to telnet into a new local network port. It's not the much better ipdb, but simply pdb.