Disable the Pygame console Output [duplicate]
Asked Answered
T

1

2

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.

Tantalate answered 10/8, 2011 at 14:29 Comment(1)
The other software that is using the joystick output needs to use the console for displaying of various information to the user.Tantalate
C
1

This thread should resolve this: printf statements 1.9.1

I had this same issue except when running under PyScripter it causes a huge memory leak in PyScripter itself. So it was eating up all my memory on my machine. Nasty interaction.

Chloras answered 7/12, 2011 at 6:20 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.