[QUESTION]ImportError: No module named bge

hello all:

I am working in Blender 2.56+python3.1
When i do:

import bge

it prompts an error: ImportError: No module named bge

anybody knows what is the problem and how to fix it?

As I understand it, the bge modules are only available while the Game Engine is running.