Hi everyone,
I would like to briefly bring our open-source Python project to your
attention: a freely available browser-based Python environment for
education. I imagine it might be useful for a number of teachers and
educators.
Before going on, please let me place an important disclaimer: this is
a project we do out of passion for teaching Python programming. We do
not profit in any way by people using it. There is no premium
version, no subscription or anything else. Just an open-source Python
environment based on Pyodide and our conviction that good teaching
materials should not come with a price tag. In this sense, I hope you
will excuse our blatant `advertisement'.
The resources
-------------
The running IDE/environment is available here:
https://webtigerpython.ethz.ch/
If you want to jump right to the source code:
https://gitlab.inf.ethz.ch/public-dkomm/webtp/webtp-core
There is also a (somewhat older) online tutorial that is available in
English, French and German:
https://programmierkonzepte.ch/engl/
Should you want to learn more about our overall project, you can find
the website here:
https://tigerjython.ch/en
Brief background
----------------
The project `TigerPython' (originally `TigerJython') started in 2012
when I created a Python IDE for my teaching at high school. Based on
Jython, I added improved error messages and worked with some friends
on a number of additional libraries such as graphics and support for
robotics. To my surprise it spread rather quickly in high schools,
mostly in Switzerland and Germany, we founded a small group of
volunteers (the `TJ-group') and started to write accompanying
tutorials, giving workshops, etc.
Having a Python-environment based on Java caused a number of issues,
though. In particular, many students and schools are using iPads,
say, which do not run Java at all. We therefore decided to relocate
to the web and create a browser-based version that would run on
essentially any device. To keep it as simple as possible, we left out
features like an interactive concole and focused more on a paradigm
where you just enter the code and hit `play'.
While the surface looks (deceptively) simple, we are working on a lot
of power behind the scenes. For instance, WebTigerPython provides
support for PyGame directly in the browser. There is also a visual
debugger (it needs to be turned on in the settings on the very top
right, though), enhanced error messages in a number of different
languages and support for the Micro:bit. Support for multiple files
is in beta-testing and will come soon, too, but we really want to make
sure we keep the simplicity of the IDE, without cluttering. If you
notice a tiny arrow on the lower left, you can open a small built-in
documentation of some modules (we are still working on expanding
that). Finally, if you wrote some code that you want to share (with
students, day), you can do just that through the `share`-button on the
top right: your entire program code will be encoded in the URL, which
means that you do not depend on any server storing your program, but
it also puts some practical limitations on the length of a shared
program.
The team behind TigerPython is for the most part working at the
universities `ETH Zurich' in Switzerland and `KIT' in Germany. We
understand this project as our mission to advance programming
education; and, of course, we love the occasional engineering
challenge to improve it further. It is only a small contribution to
the huge Python ecosystem, but perhaps one that is found to be of some
value.
Full disclosure: the only thing that we do potentially get out of more
users is some anonymised usage data—if you consent, that is. For
instance, one of our primary endeavours is to get really good and
helpful error messages and figure out what the major issues and
hurdles are for students who learn to program in Python. On top of
that: if you run into some issue, have a special request or some
motivational words for our young team, please report a bug (directly
inside the IDE) or get in touch.
Differences to Python
---------------------
There are a few small differences between TigerPython and the usual
vanilla Python that I should probably mention, too:
1. We added a new loop with the keyword `repeat`. It is quite simple,
really: `repeat 5:` lets you repeat something five times and is
internally translated to `for _ in range(5):`. This addition is based
on empirical research suggesting that `repeat` is much more intuitive
than `for` and it lets us avoid the hassle with variables while
introducing some basic concepts like loops.
2. Coming from Python 2, I slightly changed the semantics of
`input()`. Python 2 would try to evaluate the input as a Python
expression. This is quite neat for entering numbers, say. However,
when entering a string (without quotes), Python would spit at you and
raise a good old NameError. I changed that to something IMHO more
`sensical' where `input()` tries to convert your input into an int, a
float or return it as a string otherwise. Fast forward a couple of
years, Python 3 has changed the semantics of `input()` quite a bit,
whereas we have a number of tutorials and textbooks relying on that
adapted semantics, opening a bit of gap here.
3. The error messages in TigerPython are sometimes a bit more
`aggressive' than in plain Python. If you enter a simple name, say,
like `foo`, TigerPython will tell you that this is not really doing
anything. The reason behind this is that many of my students forgot
to put the parentheses for function calls (i.e. `foo()`) and be
puzzled that the program would not do anything. Others wrote `x + 2`
instead of `x += 2`, etc. You can, however, turn those enhanced error
messages off in the settings.
We are currently discussing ways to make this more configurable.
However, as a pedagogical environment, we must do this in a way where
students do not accidentally turn a feature off and be stumped by
their programs no longer working correctly without any visible
difference.
Academic publications
---------------------
We have also published a small number of academic publications in case
you are interested to see what we do in terms of research with this:
C. Bachmann et al.: WebTigerPython -- A Low-Floor High-Ceiling Python
IDE for the Browser
https://arxiv.org/abs/2410.07001
T. Kohn & B. Manaris: Tell Me What's Wrong: A Python IDE with Error Messages
https://dl.acm.org/doi/abs/10.1145/3328778.3366920
T. Kohn: The Error Behind The Message: Finding the Cause of Error
Messages in Python
https://dl.acm.org/doi/abs/10.1145/3287324.3287381
Closing
-------
There are already a number of great Python environments for
educational use. TigerPython might add to that list the possibility
to run your programs inside your browser without any download or setup
required and from virtually any device. However, our main focus is on
improving the `more hidden parts' like error messages. It really is
entirely free to use, without any kind of account, subscription or
premium plan. Clearly, it will, and cannot, serve all needs and use
cases, but if it helps someone out there learn or teach students how
to program in Python, we are happy! :-D
Kind regards
Tobias
– on behalf of the TigerPython core development team: Tobias Kohn,
Clemens Bachmann & Dennis Komm
Prof Dr Tobias Kohn
Professor of Computer Science and Education
Karlsruhe Institute of Technology (KIT), Germany
[email protected]
_______________________________________________
Edu-sig mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/edu-sig.python.org
Member address: [email protected]