I am learning Python from Coursera. In this course they use SimpleGUI module on CodeSkulptor. Can anyone tell me how to integrate SimpleGUI with python 2.7 and 3.0 shell?
Long story short, simplegui is a simplified GUI generator using Tkinter. I was attending a course from Coursera named An Introduction to Interactive Programming in Python (Part 1). You can follow the exercise by using CodeSkulptor that runs Python programs in your browser.
You can just use SimpleGUITk (http://pypi.python.org/pypi/SimpleGUITk) which implements a Tk version of simplegui.
To use your CodeSkulptor code in the desktop, you just need to replace
import simplegui
with
import simpleguitk as simplegui
and that's it, your program made for CodeSkulptor code should work on the desktop.
You can use my
SimpleGUICS2Pygame package.
Objectively, this is the best solution :-)
The package implement simplegui, codeskulptor, numeric and simpleplot modules.
If your Python tools are up to date, it is easy to install:
python -m pip install SimpleGUICS2Pygame --user --upgrade
In your code, replace the import command
import simplegui
by
try:
import simplegui
except ImportError:
import SimpleGUICS2Pygame.simpleguics2pygame as simplegui
and your code run in CodeSkulptor and in standard Python (2 and 3) with this package.
Note that:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With