How do I use Joystick in python to control which button does what and to read events?

I was still using 2.65, switched to 2.66 so sorry I keep making topics I solve 2 minutes later.

Why Python?

You can setup a sensor for each task you want to achive (e.g. Fire, run, jump) then the controller/actuators do not need to know if it is a joystick, keyboard or whatever sensor. The best is you get a nice GUI for setup ;).

What exactly are you going to do?

I’m working on my online game, 2 to 4 players. I can get keyboard events, but no joystick.

It would be less complicated if I verified weither each sensor was true or false than registering every key hit?

Use bge.logic.joysticks:
http://www.blender.org/documentation/blender_python_api_2_66_4/bge.logic.html#bge.logic.joysticks

Depends on what you understand as “complicated”.

The GUI solution, allows you to use any sensor you want. One sensor for one purpose. Each single tasks runs when there is input only. This makes it pretty efficient. (Hint: the python controller is also part of the GUI)

A pure python solution moves this logic from GUI to python code. Here you have the option to create one complicated piece of code that deals with every possible input. Or you separate the concerns as mentioned above (separate processing for the purposes).
This can be done via different python controller or by checking with code what should happen. Even with the python solution, it is more effiicient to run only when the is input (e.g a button gets pressed, or a joystick moves)