Primarily a standard Python (2 and 3) module reimplementing the SimpleGUI particular module of CodeSkulptor (a Python browser environment). In fact a package also with other modules adapted from CodeSkulptor.
It is primarily a standard Python (2 and 3) module reimplementing the SimpleGUI particular module of CodeSkulptor and CodeSkulptor3 (a Python browser environment). 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).
If you have some problem
If you have problem with some command, you can see its documentation in the modules page.
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.
Installation requires that Python tools are up to date. If not, then see the Online HTML documentation. Else, simply do:
$ python -m pip install SimpleGUICS2Pygame --user
Note that $ represents the prompt and do not be entered by you.
If several Python implementations are installed, maybe you must use something like python2 or python3 instead python command.
With the --user option the installation is made in the user directory and doesn’t require administrator rights.
Normally all requirements are automatically installed. But for that you need have pip and other installation packages installed and up to date.
On Arch Linux you can use this package installation script (written by Danny Fajardo): Arch_Linux/PKGBUILD.
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 .
- Two simple online examples:
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 program is a free software (GPL license). It is completely free (like “free speech” and like “free beer”). However you can support me financially by donating.
Copyright (C) 2013-2016, 2018, 2020 Olivier Pirson
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
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.
It contains codeskulptor, numeric, simpleguics2pygame and simpleplot modules that reimplement codeskulptor, numeric, simplegui and simpleplot modules of CodeSkulptor.
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.
simplequi (Arthur Gordon-Wright) is another implementation of SimpleGUI of CodeSkulptor, using Qt/PySide2. It is a partial implementation that I have not tested.
2.1.0 — November 29, 2020
Removed Pygame restriction to version 1.9.6.
Removed old special cases when Pygame was not installed.
Cleaned some warnings from mypy.
example/Nostalgic_Basic_Blitz.py: corrected bug with negative position of bomb.
2.0.3 — October 2, 2020
Corrected reading permission of files in distribution files.
Added Arch Linux installation script (written by Danny Fajardo).
2.0.2 — May 23, 2020
Updated image and sound links.
Completed missing type annotations in simpleguics2pygame/control.
2.0.1 — May 21, 2020
Added class diagram generated by Pyreverse.
Updated image and CodeSkulptor program links.
Adapted example/Memory.py with images moved to HTTPS.
Added type annotations (in Python 2 mode) for each function.
Cleaned some type annotations instead ignore them.
2.0.0 — April 18, 2020
Converted from Mercurial version control system to Git.
Corrected files included in MANIFEST.in for distribution building. (Thanks to 7coil.)
Improved installation. Now all requirements are automatically installed.
Splitted the big file ``simpleguics2pygame.py``.
Added alpha possibility on background color.
Added dealing of joypads.
Added dealing of MP3 sounds. Added draw_arc() in Canvas and test_arc.
Added Frame.download_canvas_image(), Frame._cursor_auto_hide and Frame._set_cursor_visible().
Added codeskulptor_version() in codeskulptor_lib.
Added draw_text_multi() in simplegui_lib_draw.
Added --frame-padding (thanks to 7coil), --last, --help, --print-application-args, --print-args and --version command line options.
Added randomize_iteration() in codeskulptor.
Added transparent “color” name.
Added ValueError exception if draw_text() try to draw a text containing unprintable whitespace character.
Corrected keys parameter use in simplegui_lib_keys.Keys().
Improved dealing of input box.
Updated simpleplot module, to “run” same if matplotlib is not installed.
Corrected “Read the Docs” subpackage problem.
Added a developer’s page.
Replaced _WEBSITE value by documentation link.
Updated. (Thanks to John Gray and Tom Keller.)
Splitted media links to image links and sound links.
Updated installation documentation.
Updated media and CodeSkulptor programs links.
Moved from CodeSkulptor to CodeSkulptor3.
Added script/pygame_check.py to check Pygame installation alone.
Added static checking in Makefile, and corrected a lot of style warnings.
Corrected and updated test/test_sound.py.
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.