11. May 2012 · 4 comments · Categories: News

We’ve released our Python GPIO library on GitHub under an open source license. The repository contains the library,  installation instructions and some demo programs. You will also need to install the GPIO Admin tool.

Here’s a one of the demo programs in action:

Detailed reference documentation is available within the Python environment itself:

$ python3
Python 3.1.2 (release31-maint, Dec 9 2011, 20:50:50)
[GCC 4.4.5] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import quick2wire.gpio
>>> help(quick2wire.gpio)

To report issues or request features, use the project’s issue tracker.

About the author: Nat Pryce

4 Comments

  1. This all looks pretty good, I’ve just got my Raspberry Pi and I’m looking to do the type of things I’m currently doing with my Arduinos and Jeenodes so, for me, an I2C interface is quite important.

    All I need to to now is learn Python!!

    Reply

  2. Is there any particular reason this is using Python 3? Will it work OK with python 2.7? I am asking because, I am wanting to to use the python Flask framework in an Apache mod_wsgi enviroment and the Flask framework will not work with python 3.

    Thanks.

    Reply

    • W’re using Python 3 for a number of reasons:

      1) We’re developing educational kits and it’s the Python version selected for the Raspberry Pi educational release (see http://www.raspberrypi.org/phpBB3/viewtopic.php?f=10&t=5470)

      2) It makes a clear distinction between byte buffers and text strings, which makes doing I/O and working with raw data easier than in Python 2

      3) It has only one, universal, type system/object model, and so avoids confusing errors caused by accidentally not declaring that your class extends object.

      Our GPIO API might work in Python 2.7, but I’ve not tried it.

      Reply

  3. The GPIO API does work in Python 2.7, I have just built the binary counter thing like in your video and its happily counting away.

    I hope you can keep backwards compatibility.

    Thanks.

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>