Possible Duplicate:
How to suppress console output in Python?
Currently I am using pygame to read joystick input and I have the following issue that I need to solve.
When calling functions in the joystick module such as get_axis()
or get_button()
the function prints out lines such as SDL_JoystickGetButton value:0:
I need to disable the output of these lines to the console.
I have found the following question/answer on stackoverflow which is what I'm looking for...
How to suppress console output in Python?
But this post does not supply enough information. Because if I have to turn off DEBUG, I would like to know the steps on how to do that. So far I have downloaded the pygame source and went into joystick.c and commented out the lines that print to the console, and then I ran the setup.py, but the joystick functions still print out to the console. Also I am using Python 2.6 and pygame 1.9.1.