Help understanding API

Ok, so i know the title makes me sound like a complete noob, and maybe i am, but first read this to confirm. So i am making a fps(shocker) and i started to learn python because i realized i was very limited with only logic bricks. With python i made a working script to randomize how the bullets shoot from the gun, simulating spread. So thats about as good as I am right now. (by the way if you are new and want that script just post a reply saying so and ill post it here)

anyway my problem is that i dont really understand the 2.5 api. for example
class bge.types.SCA_PropertySensor(SCA_ISensor).
That is obviously a property sensors, but how do i find out what the actual code i need to type into my script is if i want to use a property sensor?

would i just do something like.

import bge
cont = bge.logic.getCurrentController()
propsensor = cont.sensors[“SensorNameHere”]

and then to use propName would i do?

propsensor.propName = ?

or
propsensor(‘propnamehere’, ‘valuehere’)

Im really confused could someone explain how i would use the property sensor because i think thats a good example plus i need to know it.

and also please dont tell me to learn regular python first because i have done that for about the last week and a half when i havent been in school/schoolwork or at sports.

Start Blender
got to the Game-Logic
make two Sensors (for the Cube!) one Always, and another Keyboard with e.g. Space-Button chosen!
and two Python controllers, connect each sensor to one controller
make a Text with name info.py and put into it this code:


import bge
print("OK")
cont = bge.logic.getCurrentController()
print(dir(cont))
print(cont.name)
print(cont.sensors[0])
print(cont.sensors[0].name)

#if cont.sensors[0] == Keyboard:
#    print(dir(cont.sensors[0]))
if cont.sensors[0].name == "Keyboard":
   print(dir(cont.sensors['Keyboard']))

and chose in the controllers the script (just made: info.py) (click in the field, all available scripts are shown for more test!)

Run the game engine and look into the 'real console!, where you can see info you may be interested into
etc. …