lordmauve / pgzero

A zero-boilerplate games programming framework for Python 3, based on Pygame.
https://pygame-zero.readthedocs.io/
GNU Lesser General Public License v3.0
530 stars 190 forks source link

Builtins not available using IDE mode under Spyder #226

Open Flagnac opened 4 years ago

Flagnac commented 4 years ago

I installed pgzero and tryed the following Code:

` import pgzrun

from pgzrun import *

from pgzrun import Actor

alien = Actor('alien') alien.pos = 100, 56

WIDTH = 500 HEIGHT = alien.height + 20

def draw(): screen.clear() alien.draw()

pgzrun.go() `

Its an example from the pgzero-site. But everytime i got this Error : NameError: name 'Actor' is not defined

I tryed it with diffrent commented import styles but it still doesnt work. Thank you for helping:)

One more thing: I´m using Spyder.

rcsmit commented 3 years ago

Add from pgzero.builtins import Actor, animate, keyboard at the top.