Problem in python scripting

import bge

def main():

cont = bge.logic.getCurrentController()
own = cont.owner


 
own.applyMovement(( 0, 0.5, 0), True)

main()

it is showing error !!

Error: Python script fail, look in the console for now…

Traceback (most recent call last):
File “\gamelogic_simple.py”, line 1, in <module>
ImportError: No module named ‘bge’
Error: Python script fail, look in the console for now…

PLEASE HELP !!!

Game engine scripts are meant to be run in the game engine, not by clicking the “Run Script” button.

To run a script, try setting up some logic bricks, like an “Always” sensor connected to a “Python” controller with your script, then run the game engine.