I am trying to automate a app using python. I need help to send keyboard commands through python. I am using powerBook G4.
To the best of my knowledge, python does not contain the ability to simulate keystrokes.  You can however use python to call a program which has the functionality that you need for OS X.  You could also write said program using Objective C most likely.
Or you could save yourself the pain and use Automator.  Perhaps if you posted more details about what you were automating, I could add something further.
How i can send the commands from keyboards using python. I am trying to automate mac app (GUI)