pygame is
Simple DirectMedia Layer is
Site Swing

sPyGame - 0.0.5

Magnie Mozios (magnie)



sPygame ( Simple Pygame ) is a simplified version of Pygame ( Obviously. ^.^ ) I am currently having trouble making it so you can detect if a key is being pressed... so it doesn't do much yet. ( All you can really do is make animations or something like the so. ) Currently the Quit() function does not work fully. ( Just sys.exit(0) )


Home Page:


sPyGame - 0.0.5 - Mar 26, 2010 account Comments

If you wish to leave a comment with your account, please sign in first.

May 3, 2010 1:02pm - Steven Bluen - nickname: (sbluen)
exec doesn't work like that. exec can only be used as a statement by itself. The if statement must go inside the quotes as part of the statement to execute, or can be used with the effects of the statement. So you can do this.

exec "temp = 'pygame.' + key"
exec "if 'pygame.' + key: return 'pygame' + key"
or a third way with a different type of statement
exec "return ('pygame' + key if 'pygame' + key else None)"
But then you must make sure that you check for a typeError.
April 13, 2010 11:23am - Magnie Mozios - nickname: (magnie)
Now the question is... How do I get true or false from the exec command? I also get an error with using exec 'return' with anything and I can't do:

if exec "pygame." + key:


temp = exec "pygame." + key
if temp:

... :/
April 4, 2010 1:44pm - Steven Bluen - nickname: (sbluen)
Yeah, though there are many similar ways to do that. One way is this.
if string is in dir(pygame):
exec "return 'pygame.' + string"
March 30, 2010 11:39am - Magnie Mozios - nickname: (magnie)
So, I'll won't be able to do something like:

variable = K_RETURN



Thought so... oh well. Thanks! Now I know for the future. xD
March 30, 2010 1:03am - Steven Bluen - nickname: (sbluen)
Your program compares strings to events. Events are never strings or equal to strings to my knowledge.
March 30, 2010 12:54am - Steven Bluen - nickname: (sbluen)
For Key_pressed(key) you might want to have a look at and find out what keyboard events really are.

our projects welcomes all python game, art, music, sound, video and multimedia projects. If they use pygame or not.
recent releases
Oct 9, 2015

Sep 11, 2015

Sep 6, 2015

Aug 26, 2015

Aug 25, 2015

Aug 21, 2015

Aug 16, 2015

Jul 30, 2015

... more!
for pygame related questions, comments, and suggestions, please see help (lists, irc)