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.

1
  • The other software that is using the joystick output needs to use the console for displaying of various information to the user. Commented Aug 10, 2011 at 16:01

1 Answer 1

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.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.