This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

Peggy helps you to create GTK applicatiosn that run out-of-the-egg.

It offers functions to load ressources (like .glade files, images, locales) from a (zipped or unzipped) egg.

Peggy is a thin layer on top of setuptools and PyGtk. It’s not doing much fancy stuff but can save you from reading some docs ;-)

Let’s say we have the following module:

mymodule
|-- __init__.py
`-- data
     |-- logo.png
     |-- main.glade
     `-- data.dat

and want to distribute it as an EGG. Peggy helps us to use the files in the data subdirectory, no matter if mymodule is in a zipped egg or just somewhere in sys.path.:

>>> import peggy

First we create an instance of peggy.Peggy to handle our module:

>>> p = peggy.Peggy('mymodule')

Now we can load the glade file to get a gtk.glade.XML instance and use it to get our widgets:

>>> gladefile = p.get_glade('data/test.glade')
>>> gladefile
<gtk.glade.XML object at 0x9e22dc4 (GladeXML at 0x9b8de98)>
>>> gladefile.get_widget('window1')
<gtk.Window object at 0x9e22d4c (GtkWindow at 0xa08a0e0)>

Next we load the logo into a gtk.gdk.Pixbuf:

>>> logo = p.get_pixbuf('data/logo.png')
>>> logo
<gtk.gdk.Pixbuf object at 0x9ca252c (GdkPixbuf at 0xa0b1ae0)>

Finally we get the contents of data.dat into a string:

>>> s = p.get_string('data/test.txt')
>>> s
'Just some data'
Release History

Release History

0.02

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.01

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting