pgzero icon indicating copy to clipboard operation
pgzero copied to clipboard

Builtins not available using IDE mode under Spyder

Open Flagnac opened this issue 5 years ago • 1 comments

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.

Flagnac avatar Jul 14 '20 11:07 Flagnac

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

rcsmit avatar Oct 21 '20 11:10 rcsmit