Off Topic: Python Application

musat
Contributor III

We had a third grade student ask the principal about making Python available to them. I admire the initiative and am trying to figure out a way to make this happen. We have Terminal configured as a restricted application, so that is not possible. Is there some other way to run Python scripts in a window? Like a little Python sandbox? Or a Terminal replacement that can be locked down as to what commands are available to run?

Just trying to figure out a way to make it possible for this 8 year old to teach his peers some programming skills.

6 REPLIES 6

denmoff
Contributor III

Maybe setup a vm?

chriscollins
Valued Contributor

If you give your students access to an iOS device, you could put Pythonista on it from the app store.

psliequ
Contributor III

You can install the latest Python from their site which gives you an IDE that you can execute python code within, no terminal required. Python 3.3 and above need an updated Tcl installation too but all this is covered in their docs.

gregneagle
Valued Contributor

Perhaps you could provide an AppleScript that does this:

do shell script "/usr/bin/idle"

Which would open the IDLE Python shell; no Terminal needed. You would need to allow the Python application inside the /System/Library/Frameworks/Python.framework.

What psliequ mentions above is this same IDE, but there's no need to install a new version of Python to get it.

gregneagle
Valued Contributor

Oh -- would like to point out -- once the system Python is available, having the Terminal locked down may be a bit pointless, as anything you can do from the Terminal you can do from Python.
If the users don't have admin, they really can't do any damage with Terminal access, though.

if this concerns you, you might be better looking for some "Python in the browser" implementation like

http://www.skulpt.org
or
http://repl.it/languages/Python

These may not have enough features to satisfy the students.

musat
Contributor III

Thanks for all of the tips. I'll look into the options that you've suggested.