Need to find the source code for print or printf in python
printf, printing, python
Solution
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.
Problem
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.