Welcome, guest | Sign In | My Account | Store | Cart

Notice! PyPM is being replaced with the ActiveState Platform, which enhances PyPM’s build and deploy capabilities. Create your free Platform account to download ActivePython or customize Python with the packages you require and get automatic updates.

Download
ActivePython

SuperWires is unavailable in PyPM, because there aren't any builds for it in the package repositories. Click the linked icons to find out why.

 Python 2.7Python 3.2Python 3.3
Windows (32-bit)
Windows (64-bit)
Mac OS X (10.5+)
Linux (32-bit)
Linux (64-bit)
 
Links
Author
License
Apache 2.0
Dependencies

README

Introduction:

This graphics library was written to be exactly comptible with the chapters

System Message: WARNING/2 (<string>, line 9)

Block quote ends without a blank line; unexpected unindent.

in the book: 'Python for the Absolute Beginner'. The reformatted version of livewires(http://tertial.livewires.org.uk/python/home) was incredibly simple to use, powerful, and had many features. As the book became outdated copies of the library-the reformated version-became harder and harder to find. Trying to find a copy to teach some newcomers to python and failing, we decided to write our own library, compatible, to the dot, with the book's tutorials. Hopefully this will help a some people.

System Message: ERROR/3 (<string>, line 16)

Unexpected indentation.
Since this is a reformatted version of livewires,we decided to call it

System Message: WARNING/2 (<string>, line 17)

Block quote ends without a blank line; unexpected unindent.

superwires. If you have a copy of the book, or any of its programs, you only have change the line: 'from livewires import game' to 'from superwires import games' and it will work as intended. If you don't have the book and just want a good graphics library for python, read the tutorial ahead, or read the documentation at: https://googledrive.com/host/0B2I9paZB7gk9ckl6cjB3WFA1S0E/ and: https://googledrive.com/host/0B2I9paZB7gk9VGVOaXZ1U0pzODA/

Tutorial

Simple Program:

from superwires import games

games.init(screen_width=640, screen_height=480, fps=50) #makes screen with width, height, and frames per second

games.screen.mainloop() # event loop

That made a black window!!!

Now add this line in the middle: games.screen.background=load_image('filename.png')

That made a background!!!

Now this: games.screen.add(Sprite(games.load_image('file.png'), x=320, y=240, dx=3, dy=3))#dx and dy stand for delta x and delta y

That made a moving sprite!!!!

Overriding Sprite:

First make a class:

class Bouncy_Ball(games.sprite):
def __init__(self):
super(self, Bouncy_Ball).__init__(games.load_image('ball.png'), x=320, y=240, dx=3, dy=3)#normal super init
def update(self): #this is empty by default but is called every frame
if self.left<=0 or self.right>=640:#right and left edges to check if on edge
self.dx*=-1#reverse x velocity
if self.top<=0 or self.bottom>=480:#top and bottom edges to check if on edge
self.dy*=-1#reverse y velocity

Now instead of adding a sprite do: games.screen.add(Bouncy_Ball)

That made a bouncing ball!!!!!

Subscribe to package updates

What does the lock icon mean?

Builds marked with a lock icon are only available via PyPM to users with a current ActivePython Business Edition subscription.

Need custom builds or support?

ActivePython Enterprise Edition guarantees priority access to technical support, indemnification, expert consulting and quality-assured language builds.

Plan on re-distributing ActivePython?

Get re-distribution rights and eliminate legal risks with ActivePython OEM Edition.