Is TigerJython still maintained/developed?
Yes. TigerJython is now primarily maintained by the non-profit association TJ-Group. In addition to this, ETH is conducting research in further developing TigerJython, its pedagogy, and applications.
One focus of our current efforts is to develop a web-based version of TigerJython, which runs in the browser and without the need for Java. The first version of Web-TigerJython was published in December 2018.
Python / Jython
What is the difference between Python and Jython?
The programming language «Python» requires an interpreter to run the script or program. There are several such interpreters and «Jython» (short for «Java Python») is one of them, itself running on the Java platform (JVM). This has the advantage that you can use the full libraries from Java in your Python programs. At the same time, platform specific extensions of Python (often written in «C») do not work in Jython.
Often more important is the difference between the two major versions of Python: Python 2 and Python 3 (see What’s New In Python 3.0). Jython uses the language specifications of Python 2.7 and so does TigerJython. This means, for instance, that «print» is a statement and not a function as in Python 3.
What is the difference between TigerJython and Python?
TigerJython is an IDE (Integrated Development Environment) for the programming language «Python». To actually run your Python programs, we use the Jython interpreter. However, we made some small changes to the language for educational purposes:
- We use small dialog windows for user input instead of the console. This way, it is more obvious when a Python program is requiring and waiting for user input.
- In Python 2, any input is treated like a Python-expression and hence evaluated. Thus, if you enter your name, Python will look for such a variable unless you put it into quotation marks. We find this rather confusing and not helpfull in an educational environment and therefore changed this behaviour: our input-function looks at the input without reference to any variables and returns either a string, an integer or a floating point value.
- In Python 2, the standard division operator '/' means either «(rounded) integer division» or «floating point division», depending on the context. In TigerJython we always use '//' for «integer division» and '/' for «floating point division».
- There is a «repeat»-statement not found in standard Python (see below).
- We added some builtin-functions for educational purposes, which are always available, without the need for importing a package.
Please note that you can change most of these aspects using the preferences dialog. You can also find information about our modifications here.
Can I use packages like «NumPy» with TigerJython?
That depends on the package, but often no, unfortunately you cannot.
Standard Python (also called «CPython») has been enhanced with additional platform-specific libraries. Such libraries do not work with the Java platform, which is inherently platform independent. Therefore, if a package is written in Python only, chances are very good that it will run in Jython without any modifications. However, if a package uses some non-Python-extensions, it will most probably not work in Jython.
There is, however, an on-going project to improve the situation and make even platform-specific libraries available in Jython: JyNI – Jython Native Interface.
Can I use graphics packages like «Turtle» with TigerJython?
Due to its Java nature, Jython uses a different graphics engine than standard Python («swing» and «awt» vs. «Tkinter»). That's why most graphics packages from Python do not work under Jython.
However, we did include a series of graphics packages of our own to get you started quickly. These packages also contain a turtle-module, called «gturtle». Even though it is not completely compatible with Python's turtle-module, you will find it quite powerful and convenient to use. Find more information on the Turtle-page or in the «APLU Documentation» right inside the TigerJython-application.
The newest version also includes a «turtle»-module which is as close to the standard turtle-module as possible. There still are some limitations such as:
- You do not need a mainloop because the program is run inside Java, anyways.
- There is no undo-mechanism and clearing the window will remove the drawings of all the turtles.
- The turtle does not have a tilt nor can you change the turtle's image.
If you want to develop GUI applications, you can use Java's swing as explained here: GUI Applications in Jython.
Why did you add a «repeat»-statement to the language?
One of the most difficult aspects for programming novices are variables and loops, especially when combined. With the «repeat»-statement we provide the means to create a looping construct without the need for variables. This way, you can introduce one concept after the other and make it easier for the students to understand them. So far, our experience with «repeat» has been very encouraging.
Internally, the «repeat n»-statement is translated to «for __i1 in xrange(n)» and a «repeat» without expression to «while True». Each «repeat n» thereby gets its own looping variable (i. e. «__i1», «__i2», etc.) so that they can be arbitrarily nested.
If you are not happy with the «repeat»-statement, you can disable it in the preferences dialog.
The IDE / Editor
How can I increase the font size?
There are two possibilities. First, you can use the preferences dialog to permanently change the font size for the editor windows.
However, if you are using TigerJython during, say, a presentation, you might need to adjust quickly to the available screen, projector and space. In such cases, hold the «Ctrl»-key and use your mouse wheel to zoom in or out, just as you would in your browser. This zooming works in and is specific to each window and will be reset once you restart.
Is there a way to quickly indent/unindent a passage?
Yes. Use the «Tab»-key for that purpose. Start by selecting the entire block of code you would like to indent and then press «Tab». To unindent, hold «Shift» and then press «Tab».
In what languages is the IDE available?
The IDE is currently available in German, English, Dutch, French and Italian (with some limitations). You can change the language using the preferences dialog.
If you need another language and could provide a translation, we are more than happy to include it into the official distribution. Please write to jython@tobiaskohn.ch if you want to make such a translation.
Why do you not use the console for general output?
When teaching functions we found that students had difficulties grasping the meaning of «return» and especially the difference between «return» and «print». When working in the traditional console, the effects are very much alike – at least for simple (introductory) examples. By separating the output pane from the interactive console, we hope to facilitate understanding the different natures of the two concepts «return» and «print».
Can I install TigerJython for multiple users?
Yes, but you have to do it manually by editing the configuration file. We assume that you want to put TigerJython into a common (global) folder for all users and each user will then have his or her own preferences/settings.
First, put tigerjython2.jar into the common folder, say, C:\Program Files\TigerJython and create a new text-file (with utf-8 encoding) called tigerjython2.cfg in the same location (it is important the names differ only in the ending jar vs. cfg). This is the file you will be editing. Next, create or select a location to put the user-specific settings, for instance C:\Users\Guido\TigerJython, where C:\Users\Guido is the standard user-path set by the system. Then add the following lines to the global config-file you just created above and you're done:
configfile = sys.userpath + "TigerJython\\tigerjython.cfg" jython.cachedir = sys.userpath + "TigerJython\\pkgcache"
There is a shhortcut on Windows-systems. If TigerJython detects that it is in the "Program Files"-directory and that there is no config-file there, it will automatically look for such a config-file in the %AppData%\Locals-folder and create a config-file there if necessary. In other words: it is enough to just copy tigerjython2.jar to, say, C:\Program Files\TigerJython and TigerJython will take care of a user-specific configuration for you [This is implemented since version 2.9.01 from October 25].
Where can I report bugs or ask for new features?
Bug reports and feature requests are always welcome: just send an email to help@tigerjython.com (general) or jython@tobiaskohn.ch (IDE) or write on our forum. We will do our best to address your request as quickly as possible.
If you have a bug report, make sure you give us (if possible) all the details we need to reconstruct the error. This includes the system you are working on (i.e. Windows or Mac OS X) as well as a python script which will lead to the error reported.
The integration of new features depend on the work needed to implement them and they will have to work well with the general concept of our simple learning environment. We will, for instance, not include project management capabilities.
Where does the name «TigerJython» come from?
Tigerpython is the german name of «python molurus», a species which can also be found on Java.
What does «APLU» mean?
APLU is short for «Aegidius Plüss», the author of many libraries included in TigerJython, comprising turtle graphics, robotics, game development and more. The «APLU Documentation» included in TigerJython gives you a description of these libraries.
Is the source code for TigerJython available?
No. The TigerJython IDE is currently part of active research and used in a doctoral thesis. However, we make sure that TigerJython will remain available for the foreseeable future.
What information does TigerJython collect?
Unless you explicitely opt to send us automated feedback, TigerJython does not collect any data whatsoever. If you turn on sending us automated feedback in the preferences, however, TigerJython sends the following information back to a server in Switzerland:
Every time you run a program TigerJython sends an anonymized copy of the program along with all the error messages to our server. To make sure the program does not reveal any personal information we remove all comments and words within string literals before sending the data. We also change all numbers with more than two digits. Example:
# example.py
def sqr(x):
"Squares a number."
return x**2
print sqr(1234)
What is actually sent to our server is the following:
############
def sqr(x):
"Xxxxxxx x xxxxxx."
return x**2
print sqr(1004)
We collect this information in order to find out what kind of mistakes Python programmers make. Our primary goal is to produce good and helpful error messages. We are also interested to see what kind of mistakes novice programmers might make. Information is only collected in this anonymized form and we have no possibility nor intent to link any data to a particular person or institution. We might use the collected data in future research and make it available to other researchers.
Please consider helping us improve our knowledge of Python programming and what mistakes might occur! Your contribution is highly appreciated.
Known issues and problems
Elements are drawn/rendered overlapping, out of place or not at all
Solution: disable «Direct3D-drawing» in the advanced settings.
Explanation: on Windows Java uses «Direct3D» to draw the graphical components. On some systems, however, this can cause problems. Using the setting mentioned above you can make Java use an alternative, more stable graphics API. This settings corresponds to Java's «sun.java2d.noddraw=true».
Errors cause the programm to stop but no message is shown
Solution: update to the newest version of TigerJython.
Explanation: Jython can have problems if the path of TigerJython or of the running program contains non-ascii-characters (such as, e. g., Umlauts). The newest version of TigerJython should fix the problem.