I am working on something that I cannot entirely talk about. All I can say is that I am a student in Information Security and Computer Science.
I simply need to change some source code of something deep inside python. For now, I would specifically like to change source code inside the builtin print function. Unfortunately, I can't find it defined any where in the python source code files.
Any ideas whatsoever?
Thanks very much.
EDIT: Specifically the question intended to ask if the print function in Python could be overwritten with something else. This was intended as to plant a backdoor in the Python interpreter.
In cpython, the print
function is implemented in C, not Python. You can find the source code here, but you'll have to recompile cpython in order for changes to take effect.
For an implementation of print
in Python, have a look at pypy's version.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With