I have some old programs from back in the times when python 3.1 came out.
In the program I often used the Callable() to pass a function and it's parameters like this to my TKinter application:
tvf.mi(datei_bu, text=datei_opt, command=Callable(exec_datei_opts, datei_opt))
Now I wanted to use my programs again but the callable- Object was gone. In the web I found that this functionality was removed in python 3.2, and none of the alternatives worked for me.
Finally I decided to reinstall python 3.1. However, I have no idea if it is possible to have multiple python 3 versions installed at the same time or how to 'create' a shell command for this version when I want to use this special version.
My questions are:
- Is there a replacement for the
Callable- Object that was removed? - How can I use multiple python versions at the same time?
- How can I create a matching shell command?
It does not seem that Python ever had
Callablebuilt in. You may have confused it withcallablepredicate which indeed was removed and then brought back:All references of
Callableon the web that I could find point to swampy package (a by-product of Think Python book), which hasswampy.Gui.Callable:You can also look at answers to this question, where OP wanted to reimplement
Callablefor the same purpose.Installing Python 3.1
If you still want to try to install the old version of Python 3, you can give the following a try. I assume that Raspbian is Debian-based distro and the same commands apply. Here's the
Dockerfilethat verifies that you can do it on Debian Jessie-compatibe system. You can try theRUNcommands from it in your shell: