Two choices :
import robot
and then prefix all with robot :
my_robot = robot.robot(pygame,size[0]-400,size[1]-100)
or
from robot import robot
and then your code should work. But then, you can see that you won't be able to distinguish if robot is a module or the class, so you should not name the class and the file with the same name.