I understand I can run a script in IPython via run test.py and debug from there.
But how do I pipe an output into test.py? For example, normally I could run in the command line like grep "ABC" input.txt | ./test.py, but how do I do the same thing in IPython?
Thanks!
Inside the Python script you should be reading from sys.stdin:
Inside the iterative interpreter you can use the subprocess module mock sys.stdin.
You can also pipe the output to a file and just read from the file. For practical purposes stdin is just another file.