Here is my little program,
import pygame pygame.init()
Here is my compilation team.
python myprogram.py
Compilation error,
File "game.py", line 1, in
import pygame
File "/home/ubuntu/Documents/pygame.py", line 2, in
pygame.init ()
AttributeError: 'module' object has no attribute 'init'
I have pygame installed in my ubuntu, it is installed in
/usr/lib/python2.6/dist-packages/pygame
I found tht from IDLE, if I execute both of these statements, it works fine.
python compiler-errors
Sunnyshah
source share