pygame is
Python
Simple DirectMedia Layer
 
 
pygame.org is
Site Swing
GooeyPy

GooeyPy - 0.1

Joey Marshall (joey101)

Tags:

Description

GooeyPy is the result of my desire need for a flexible and easy to use gui for pygame. Yes, I realize there are already guis for pygame out there. But with each one there is something I don't like. GooeyPy simply has everything the way I like it. So I'm not going to say it's the best one out there, because everyone has their own opinions. Here are some things that are different about GooeyPy:

Styling:
I didn't like the way styling worked with other guis. Maybe I'm just spoiled by CSS in web development, but wouldn't it be nice if you could have CSS like styling for a gui? Oh woops, now you can! With GooeyPy, all widgets are stylable with CSS like attributes. Also, at any time during the application run time you can change the styling dynamically (and it will update itself)! All information related to displaying widgets are stored in the styling (that includes positioning; relative or absolute)
Integration:
With all the guis I've tried, you have to figure out how to integrate the gui into an already made game. Sometimes that's impossible. And if it is possible, until you figure out how the gui works, it's very hard to do. GooeyPy doesn't steal your pygame events and doesn't interfear with your bliting (well, actually it can. Setting up the surfaces can be a little hairy, but there is some nice documentation to explain it all).
Dependencies:
First of all, this isn't what you think. I'm not meaning other libs that GooeyPy depends on, but the dependencies within GooeyPy. Ok, that doesn't make a whole lot of sense... let me put it another way. You have a widget and all of the sudden you want to change the value. so you do widget.value = "hi". And it works! GooeyPy automatically knows when something changes that effects another part of itself. In this case, the value effects how the widget displays, so it will redraw itself. It works that way with everything! You never have to worry about redrawing a widget when it's dirty (and nither do I within GooeyPy, so that means a whole lot less bugs). All the dependencies are also cached.
Linking:
Another cool thing I have is you can link values from one widget to another. So if the value of widget a changes, so does the value it's linked to in widget b.
Effects:
I like the ability to have cool effects applied to my widgets. Now I have them.

If you would like to contact me regarding GooeyPy, please send me an email to web at joey101 net

Changes

* You can now pass standard functions as links!
* Other small things

Links

Home Page: http://joey101.net/gooeypy/
Source: http://cheeseshop.python.org/pypi/GooeyPy/

Screenshot


click to view original size

Releases

GooeyPy - 0.2 - Feb 22, 2009
GooeyPy - 0.1.2 - Aug 5, 2007
GooeyPy - 0.1 - May 28, 2007
GooeyPy - 0.0.4 - May 5, 2007
GooeyPy - 0.0.3 - Apr 9, 2007
GooeyPy - 0.0.2 - Apr 2, 2007
GooeyPy - 0.0.1 - Mar 26, 2007

Pygame.org account Comments

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

February 23, 2009 4:26pm - Luca Fabbri - nickname: (keul)
... no no no... sorry. The dependency is already inside the setup.py. I don't know why but easy_install didn't download also cellulose... boh!
February 23, 2009 4:24pm - Luca Fabbri - nickname: (keul) - 5/5
Finally I think I finded a REAL COOL GUI library!
Very cool! I'll use this for sure!

Only a note: you are using pypi for tour releases (great!) but so wy you didn't insert the dependencies on cellulose directly in you egg?

April 9, 2007 3:38pm - Eric Franzen - nickname: (darky)
Totally awesome! Even though I haven't made use of any of it's features I still like how clean and neat it looks!
I will probably use this for my game's UI.
April 3, 2007 3:44pm - Joey Marshall - nickname: (joey101)
Thanks Anonymous, it will be so in alpha 3!
April 3, 2007 1:30pm - Anonymous - nickname: (pywiz32) - 3/5
Nice. even though, there are a few corrections i would like to make to your program:

the function "get_image" in app.py should look like this:
def get_image(self, path, colorkey=-1, nocache=False):
if os.path.isfile(os.path.join(self.path, path)):
path = os.path.join(self.path, path)
return util.get_image(path, colorkey=-1, nocache=False)
This is when you want to put your own image as a background, and don't want it to look in the default theme directory. the pos function of widget.py whould look like this:

def pos(self, pos=None):
"""
Widget.pos -> Tuple
^^^^^^^^^^^^^^^^^^^
Get the actual position """
if pos:
x,y = pos
x = int(x)
y = int(y)
else:
x = int(self.style_option["x"])
y = int(self.style_option["y"])
if self.style_option["position"] == "relative":
if self.parent:
px, py = self.parent.pos
x += int(px) + int(self.parent.stylesets["default"]["padding-left"])
y += int(py) + int(self.parent.stylesets["default"]["padding-top"])
if self.container:
x -= self.container.offset_x
y -= self.container.offset_y
return (x,y)

This is to make sure that x and y are integers, not strings. (this has happended to me).
April 2, 2007 11:11am - Joey Marshall - nickname: (joey101)
Slight change of plans. Looks like GooeyPy alpha 3 will support python 2.3
March 30, 2007 12:05pm - Joey Marshall - nickname: (joey101)
Sorry, but GooeyPy doesn't work with python 2.3 nither does Cellulose which is a dependency. Sorry. :(
Strange being forced to use 2.3... can't imagine any scenario where that would be enforced... except for maybe on windows.

In the next alpha, ctypes won't be a dependency... actually, it's a mistake that it is with alpha 1! :P

As another note, if you have easy_install installed on your system, you should be able to just run "sudo easy_install GooeyPy" and it'll get it (actually it won't get ctypes... sorry about that).
March 29, 2007 4:00pm - HorstJENS - nickname: (horst) - 5/5
very beautiful !
I had some trobules getting it to run under Ubuntu 6.10:
needed to install python-ctypes first (from synaptic) and
cellulose (from the python cheesshop website).
I suggest to add an "contact by email" link somewhere on your website.
March 29, 2007 1:06pm - John W. Cocula - nickname: (jcocula) - 4/5
Will GooeyPy work on Python 2.3? Can it be made to work on 2.3? I am forced to use Python 2.3. Thanks!!!

-----
Traceback (most recent call last):
File "setup.py", line 2, in ?
import gooeypy
File "/root/GooeyPy-0.0.1/gooeypy/__init__.py", line 38, in ?
from util import get_image, init, update_rects, blit, update_display
File "/root/GooeyPy-0.0.1/gooeypy/util.py", line 5, in ?
from cellulose import *
File "/usr/lib/python2.3/site-packages/Cellulose-0.1.1-py2.3.egg/cellulose/__init__.py", line 15
from cellulose.cells import (DependantCell, DependencyCell, InputCell,
^
SyntaxError: invalid syntax
March 28, 2007 11:47am - Joey Marshall - nickname: (joey101)
The coolest innovation sense new style classes.

http://cheeseshop.python.org/pypi/Cellulose
March 26, 2007 9:14pm - Anonymous - nickname: (pywiz32)
ran the setup program with the build argument and got:

Traceback (most recent call last):
File "setup.py", line 2, in <module>
import gooeypy
File "C:\WINDOWS\Profiles\10324567\Desktop\jerome\downloads\GoeyPy-0.0.\GooeyPy-0.0.1\gooeypy\__init__.py", line 38, in <module>
from util import get_image, init, update_rects, blit, update_display
File "C:\WINDOWS\Profiles\10324567\Desktop\jerome\downloads\GoeyPy-0.0.\GooeyPy-0.0.1\util.py", line 5, in <module>
from cellulose import *
ImportError: No module named cellulose

WHAT THE HECK is cellulose???
spotlight

 
our projects
pygame.org welcomes all python game, art, music, sound, video and multimedia projects. If they use pygame or not.
 
recent releases
Jul 28, 2014

Jul 22, 2014

Jul 21, 2014

Jul 20, 2014

Jul 19, 2014

Jul 15, 2014

Jul 10, 2014

Jul 9, 2014

Jun 27, 2014



Jun 24, 2014

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