- python.exe -m pip install pyGAME
- python.exe -m pip install pyOPENGL
and then
open notepad.exe
open this url
https://pythonprogramming.net/opengl-rotating-cube-example-pyopengl-tutorial/
copy code from that url to notepad from
mport pygame
from pygame.locals import *
from OpenGL.GL import *
from OpenGL.GLU import *
#..... {TO} ......
pygame.display.flip()
pygame.time.wait(10)
main()
save as demo1.py
Then run with
- python.exe demo1.py
-
c:\python27\python.exe -m pip install pygame
-
c:\python27\python.exe -m pip install pyOPENGL
-
c:\python27\python.exe demo1
#To compile to *.pyc REF: https://askubuntu.com/questions/324871/how-to-compile-a-python-file
- python.exe -m compileall
- python.exe -m compileall ./
- python.exe demo1.pyc