can't run Pygame Zero from IDE with import pgzrun on first line and pgzrun.go() on last

195 views
Skip to first unread message

ca...@supersolvrs.com

unread,
Dec 29, 2018, 1:13:23 PM12/29/18
to thonny
Problem is that in the interactive shell, import pgzrun, gives an error.  This is a peculiarity of pygame Zero.  It works fin in other IDEs.  I'm dealing with 5th graders.  They can run from the commandmline, but not from Thonny.

Any chance of a fix?  Thx

Aivar Annamaa

unread,
Dec 29, 2018, 1:27:56 PM12/29/18
to thonny
Hi!

What a coincidence, I was dealing with this exact issue yesterday and today :)

I fixed a bug which caused __file__ not to be set. This allows "import pgzrun" to work.

I also implemented a special Pygame Zero mode, which allows running PGZero programs without "import pgzrun" and "pgzrun.go()". Both will be released in version 3.1, hopefully in the first week of January.

best regards,
Aivar
Reply all
Reply to author
Forward
0 new messages