So,I wanted some Opengl text in the 3d viewport (in Blender 2.79b )and decided to run the python script from blender's website which comes in the blf module (https://docs.blender.org/api/2.79/blf.html?highlight=font%20drawing) . I ran the script in the text editor and the script failed to load .When I ran the script from the console I was suprised to find this error - ImportError: No module named 'bge' .How is this possible?
import game engine modules
from bge import render Traceback (most recent call last): File "", line 1, in ImportError: No module named 'bge'
from bge import logic Traceback (most recent call last): File "", line 1, in ImportError: No module named 'bge'