Its meant to be ran from the command prompt/terminal, not imported into the interpreter.
The way you have it is showing where the file are located:
navigate there and you can see the files
P.S. Python2.x has an end of life support coming up in Jan 1st 2020.; I would suggest to start using python3.x
metulburr@ubuntu:~$ python -m pygame.examples.aliens metulburr@ubuntu:~$in which it will run the example program
The way you have it is showing where the file are located:
/usr/lib/python2.6/site-packages/pygame/examples/aliens.py
navigate there and you can see the files
P.S. Python2.x has an end of life support coming up in Jan 1st 2020.; I would suggest to start using python3.x
Recommended Tutorials: