SimpleGUICS2Pygame package’s documentation¶
It is primarily a standard Python (2 and 3) module reimplementing the SimpleGUI particular module of CodeSkulptor (a browser Python interpreter). This is in fact a package also with other modules adapted from CodeSkulptor.
try: import simplegui except ImportError: import SimpleGUICS2Pygame.simpleguics2pygame as simplegui
in your CodeSkulptor program and your program run both in CodeSkulptor and standard Python with this module (and Pygame).
This is the online HTML documentation of the working version 2.
If you have some problem¶
Next, you can search in Stack Overflow. If you don’t find answer, you can ask question like this.
Finally you can email me. I will try to help you with pleasure. (You can write me in French.)
If pip is installed on your platform you can do:
>>> pip install SimpleGUICS2Pygame
(If several Python implementations are installed, maybe you must use something like pip2 or pip3 instead pip command.)
Without pip, download the archive
SimpleGUICS2Pygame-?.tar.gz, unzip it
Next in the
somewhere/SimpleGUICS2Pygame-?/ subdirectory run:
>>> python setup.py install
In both cases, you must use admin access. So with GNU/Linux you will probably do:
>>> sudo [your command]
simpleplot require matplotlib
(and must be installed separately).
simplegui_lib (and its submodules) and
simpleguics2pygame (except for the Timer class)
(and must be installed separately).
You can run the little script
to check if all required modules are installed.
You can also test your Pygame installation alone with the other little script
With pip installed on your plaftorm you can update SimpleGUICS2Pygame:
>>> pip install SimpleGUICS2Pygame --upgrade
Complete installation on Window$ in few steps¶
- Download and run the good Pygame installation file: Unofficial Windows Binaries Pygame. (Only require for
simplegui_lib, its submodules and
- Download and run the good matplotlib installation file (and all its requirements): Unofficial Windows Binaries matplotlib. (Only require for
- Download and run the good setuptools installation file: Unofficial Windows Binaries setuptools.
- Download and run the good pip installation file: Unofficial Windows Binaries pip.
- Run in the Command Prompt (maybe with Administrator rights):
pip install SimpleGUICS2Pygame. (Probably the
pipcommand aren’t in your
PATH, so add it or move in the subdirectory of
CDcommand. This subdirectory is something like
Examples of CodeSkulptor and SimpleGUICS2Pygame use¶
You can see examples in SimpleGUICS2Pygame/example/ subdirectory from the sources archives.
Or online: Python programs running in CodeSkulptor .
Message to developers¶
This is a free software, so you can download it, modify it and submit your modifications. You can also redistribute your own version (keeping the GPL license).
Complete sources on Bitbucket: https://bitbucket.org/OPiMedia/simpleguics2pygame
This package is a completely free software, see GPL license. So it is completely free (like “free speech” and like “free beer”). However you can support me financially by donating.
CodeSkulptor is a Python implementation running in a browser. It implements a subset of Python 2. It is the environment used in the course An Introduction to Interactive Programming in Python (Rice University, Coursera).
SimpleGUICS2Pygame (Olivier Pirson) is this package. It is fully compatible with Python 2 and 3.
simpleplotmodules that reimplement
simpleplotmodules of CodeSkulptor.
SimpleGUICS2Pygame was designed to mimic behavior of CodeSkulptor. So load_image() and load_sound() methods can load medias only from URL, not local files. However SimpleGUICS2Pygame can save these medias to a specific local directory. See the Download medias tips.
There exist some little differences between SimpleGUICS2Pygame and SimpleGUI of CodeSkulptor. See Compatibility notes.
SimpleGUITk (David Holm) is another implementation of SimpleGUI of CodeSkulptor, using Tkinter and some others packages. It is really less complete and not updated. However it works for some programs.
- simplegui (Florian Berger) is a Python package which has the same name as SimpleGUI of CodeSkulptor, but it is totally something else.
Table of contents¶
- Package SimpleGUICS2Pygame
- All modules of this package
- codeskulptor — replace the codeskulptor module of CodeSkulptor
- codeskulptor_lib — some miscellaneous functions
- numeric — replace the numeric module of CodeSkulptor
- simplegui_lib — simply import the following modules
- simpleguics2pygame — the main module, replace the simplegui module of CodeSkulptor
- simpleguics2pygame — canvas
- simpleguics2pygame — control
- simpleguics2pygame — frame
- simpleguics2pygame — image
- simpleguics2pygame — keys
- simpleguics2pygame — sound
- simpleguics2pygame — timer
- simpleguics2pygame — _colors
- simpleguics2pygame — _fonts
- simpleguics2pygame — _media
- simpleguics2pygame — _options
- simpleguics2pygame — _pygame_lib
- simpleplot — replace the simpleplot module of CodeSkulptor
- License: GPLv3
- Known bug
- List of online programs
- List of online images
- List of online sounds