[QUESTION]Python and OpenGL in Blender (camera control in OpenGL??)

I am newbie in Blender…
I’d like to know how to use OpenGL commands via Python script?
I am using Python3.1 and blender 2.49.


import Blender
from Blender.BGL import *

glMatrixMode (GL_PROJECTION)
glLoadIdentity ()
#glFrustum (-1.0, 1.0, -1.0, 1.0, 1, 2.0)
gluPerspective(50.0, 1.0, 3.0, 7.0)
#glMatrixMode (GL_MODELVIEW)p
#glLoadIdentity()
gluLookAt(0,40,0,0,1.2,0,0,1,0)


Nothing happened after running it~anybody can explain why and how to use OpenGL to create an object in the scene?

blender 2.49 uses python 2.6 , that is not your problem but it wont help. why not google ‘Blender.BGL’ examples. …the list is plentiful

When i google bgl…always some sample codes of how to draw in text editor…not in the 3D view (main scene)…maybe i should use Python to create object.