|
|
| | Ask HN: Can you view/intercept/snoop the commands of a python interpretter? | | 1 point by delixd on May 23, 2014 | hide | past | favorite | |
| I'm working a project where I have a Java process from which I'm executing a python process on the machine (Linux) and stream the commands to the Python interpreter via stdin. Python returns my results via stdout. I was wondering if I can view the commands being executed by the interpreter from outside of my Java process?
I saw on stackoverflow that you can view the commands in the history with readline.get_current_history_length() readline.get_history_item() but when I fire up the interpretter and try to look at the history I only see the commands from that current session of the interpretter.
Can I somehow listen/snoop/view the commands being executed in python from outside of the python process is running them? |
|

Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4
Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact
|