Commit 62a8766b authored by SVN-Git Migration's avatar SVN-Git Migration

Imported Upstream version 0.2.1~bzr65

parents
Contributors
============
Principal Developer:
James Hancock
Major Contributors:
David Cooper
Kevin Kubasik
Stephan Richter
David Muffley
Preetam D'Souza
George Paci
Jeff Elkner
Matt Gallagher
Thomas Doggette
This diff is collapsed.
README
======
GASP (Graphics API for Students of Python)
A library built on pygame that enables absolute beginners to write 1980's style
arcade games as an introduction to python.
from api import *
import color
This diff is collapsed.
This diff is collapsed.
"""
color.py : Constants for colors (RBG values)
copyright: James Hancock, 2008
"""
ALICEBLUE = (240, 248, 255)
ANTIQUEWHITE = (250, 235, 215)
AQUA = (0, 255, 255)
AZURE = (240, 255, 212)
BEIGE = (245, 245, 220)
BISQUE = (245, 245, 220)
BLACK = (0, 0, 0)
BLANCHEDALMOND = (255, 255, 205)
BLUE = (0, 0, 255)
BLUEVIOLET = (138, 43, 226)
BROWN = (165, 42, 42)
BURLYWOOD = (222, 184, 135)
CADETBLUE = (95, 158, 160)
CHARTREUSE = (127, 255, 0)
CHOCOLATE = (210, 105, 30)
CORAL = (255, 127, 80)
CORNFLOWERBLUE = (100, 149, 237)
CORNSILK = (255, 248, 220)
CRIMSON = (220, 20, 60)
CYAN = (0, 255, 255)
DARKBLUE = (0, 0, 139)
DARKCYAN = (0, 139, 139)
DARKGOLDENROD = (184, 134, 11)
DARKGRAY = (169, 169, 169)
DARKGREEN = (0, 100, 0)
DARKKHAKI = (189, 183, 107)
DARKMAGENTA = (139, 0, 139)
DARKOLIVEGREEN = (85, 107, 47)
DARKORANGE = (255, 140, 0)
DARKORCHID = (155, 50, 204)
DARKRED = (139, 0, 0)
DARKSALMON = (233, 150, 122)
DARKSEAGREEN = (143, 188, 143)
DARKSLATEBLUE = (72, 61, 139)
DARKSLATEGRAY = (47, 79, 79)
DARKTURQUOISE = (0, 206, 209)
DARKVIOLET = (148, 0, 211)
DEEPPINK = (255, 20, 147)
DEEPSKYBLUE = (0, 191, 255)
DIMGRAY = (105, 105, 105)
DODGERBLUE = (30, 144, 255)
FIREBRICK = (178, 34, 34)
FLORALWHITE = (255, 250, 240)
FORESTGREEN = (34, 139, 34)
FUCHSIA = (255, 0, 255)
GAINSBORO = (220, 220, 220)
GHOSTWHITE = (248, 248, 255)
GOLD = (255, 215, 0)
GOLDENROD = (218, 165, 32)
GRAY = (218, 165, 32)
GREEN = (0, 128, 0)
GREENYELLOW = (173, 255, 47)
HONEYDEW = (240, 255, 240)
HOTPINK = (255, 105, 180)
INDIANRED = (205, 92, 92)
INDIGO = (75, 0, 130)
IVORY = (255, 240, 240)
KHAKI = (240, 230, 140)
LAVENDER = (230, 230, 250)
LAVENDERBLUSH = (255, 240, 245)
LAWNGREEN = (124, 252, 245)
LEMONCHIFFON = (255, 250, 205)
LIGHTBLUE = (173, 216, 230)
LIGHTCORAL = (240, 128, 128)
LIGHTCYAN = (224, 255, 255)
LIGHTGOLDENRODYELLOW = (250, 250, 210)
LIGHTGREEN = (144, 238, 144)
LIGHTGRAY = (211, 211, 211)
LIGHTPINK = (255, 182, 193)
LIGHTSALMON = (255, 160, 122)
LIGHTSEAGREEN = (32, 178, 170)
LIGHTSKYBLUE = (135, 206, 250)
LIGHTSLATEGRAY = (119, 136, 153)
LIGHTSTEELBLUE = (176, 196, 222)
LIGHTYELLOW = (255, 255, 224)
LIME = (0, 255, 0)
LIMEGREEN = (50, 205, 50)
LINEN = (250, 240, 230)
MAGENTA = (255, 0, 255)
MAROON = (128, 0, 0)
MEDIUMAQUAMARINE = (102, 205, 170)
MEDIUMBLUE = (0, 0, 205)
MEDIUMORCHID = (186, 85, 211)
MEDIUMPURPLE = (147, 112, 219)
MEDIUMSEAGREEN = (60, 179, 113)
MEDIUMSLATEBLUE = (123, 104, 238)
MEDIUMSPRINGGREEN = (0, 250, 154)
MEDIUMTURQOISE = (72, 209, 204)
MEDIUMVIOLETRED = (199, 21, 133)
MIDNIGHTBLUE = (25, 25, 112)
MINTCREAM = (245, 255, 250)
MISTYROSE = (255, 228, 225)
MOCCASIN = (255, 225, 181)
NAVAJOWHITE = (255, 222, 173)
NAVY = (0, 0, 128)
OLDLACE = (253, 245, 230)
OLIVE = (128, 128, 0)
OLIVEDRAB = (107, 142, 35)
ORANGE = (255, 165, 0)
ORANGERED = (255, 69, 0)
ORCHID = (218, 122, 214)
PALEGOLDENROD = (238, 232, 170)
PALEGREEN = (152, 251, 152)
PALETURQOISE = (175, 238, 238)
PALEVIOLETRED = (219, 112, 147)
PAPAYAWHIP = (255, 239, 213)
PEACHPUFF = (255, 239, 213)
PERU = (205, 133, 63)
PINK = (255, 192, 203)
PLUM = (211, 160, 221)
POWDERBLUE = (176, 224, 230)
PURPLE = (128, 0, 128)
RED = (255, 0, 0)
ROSYBROWN = (188, 143, 143)
ROYALBLUE = (65, 105, 225)
SADDLEBROWN = (139, 69, 19)
SALMON = (250, 128, 114)
SANDYBROWN = (244, 164, 96)
SEAGREEN = (46, 139, 87)
SEASHELL = (255, 245, 238)
SIENNA = (160, 82, 45)
SILVER = (192, 192, 192)
SKYBLUE = (135, 206, 235)
SLATEBLUE = (106, 90, 205)
SLATEGRAY = (112, 128, 144)
SNOW = (255, 250, 250)
SPRINGGREEN = (0, 255, 127)
STEELBLUE = (70, 130, 180)
TAN = (210, 180, 140)
TEAL = (0, 128, 128)
THISTLE = (216, 191, 216)
TOMATO = (253, 99, 71)
TURQUOISE = (64, 224, 208)
VIOLET = (238, 130, 238)
WHEAT = (245, 222, 170)
WHITE = (255, 255, 255)
WHITESMOKE = (245, 245, 245)
YELLOW = (255, 255, 0)
YELLOWGREEN = (154, 205, 50)
#!/usr/bin/env python
# -*- coding: iso-8859-1 -*-
from setuptools import setup
setup(
name = 'gasp',
version = '0.2.1',
packages = ['gasp',
],
author = "James Hancock",
author_email = "jlhancock@gmail.com",
description = "GASP provides a simple, procedural graphics API for beginning students using Python",
license = "GPLv3+",
keywords = "gasp",
url = "http://wiki.laptop.org/go/GASP",
classifiers = [
'Development Status :: 3 - Pre-Alpha',
'Environment :: Other Environment',
'Intended Audience :: Education',
'License :: OSI Approved :: GNU General Public License (GPL)',
'Programming Language :: Python',
'Natural Language :: English',
'Operating System :: OS Independent',
'Topic :: Education :: Computer Aided Instruction (CAI)'],
install_requires = [
'pygame',
'setuptools',
],
)
class MockBackEnd(object):
def __init__(self):
self.screen = None
self.rate = None
def create_screen(self, screen):
self.screen = screen
def set_frame_rate(self, rate):
self.rate = rate
import doctest
#doctest.testfile("test_backend.txt")
doctest.testfile("test_api.txt")
>>> from gasp import *
>>> import mockbackends
>>> mock = mockbackends.MockBackEnd()
Test set_speed for frames per second.
>>> begin_graphics(back_end=mock)
>>> set_speed(60)
>>> mock.rate
60
First failing test to make sure the setup works.
>>> 5
4
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment