I'm using mod_wsgi and was wondering if it's possible to over-write the print() command (since it's useless).
Doing this doesn't work:
print = myPrintFunction
Since it's a syntax error. :(
Print is not a function in Python 2.x, so this is not directly possible.
You can, however, override sys.stdout.
If you are on Python 3.0 in which print is now a function what you have would then work, assuming you have the right signature. Also see a related question in this site.
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