Finally I got a answer to all of my questions. I used a lot of stuff from the answers here in order to solve all my problems. Here they come:
1) Is there a replacement for the callable object that is gone?
Basically no. At least none that is working in this context. I will explain why this does not affect my solution.
I made the mistake to just rip out the code out of my TKinter-application without watching my include
-dependencies. The anwer of saaj made me rethink if had ever used swampy, and indeed I did. I even found the german equivalent ("Programmieren lernen mit python") in my bookshelf. Silly me! X}
I had my GUI components defined in different files, and I just imported them in the main.py
, my main application.
I was not very advanced in programming so I didn't know that e.g.:
sub.py: (was written long before main.py)
import THISISTHEFORGOTTENMODULE
def subfoo(temp=0):
... #some Code in which Functions from THISISTHEFORGOTTENMODULE were used
main.py:
import sub
subfoo()
temp = SuperSpecialFunctionFromForgottenModule()
subfoo(temp)
This constellation lead to the behaviour that when I wrote main.py, I didn't have to say THISISTHEFORGOTTENMODULE.SomeSpeci...
. If I would have written this, I would have known instantly what I would have to import in my new program. When I recently saw this code I thought Callable
was from the standard library. Unfortunately, there existed a function only different in one character (major C instead of minor c) in python before and was removed. This mislead me to seach for alternatives. Stuff like functools.partial
(credits to e.s.), would have worked in some situations, thanks for the knowledge, but it didn't work quite a few times.
When I finally found a from swampy import *
in one of the submodules, I was angry at myself for stepping into this tripwire.(Ironically I was the one that resolved exactly that issue).
Credits in this part to: saaj, e.s., and myself(for the research stuff)
2)+3) How to install multiple python versions at the same time?
Well, I had a look at all suggestions and for me, the update-alternatives
worked out best. I managed to install python3.1 with the suggestions of:
- sanket mokashi (The virtual environement suggestion)
- saaj (The dockerfile stuff worked out as it should)
- Byeongguk Gong (That was the most comfortable way of doing this!)
I just mention this here because it is part of the question, but I didn't need this anymore, I'll just leave the answer here for anyone that passed by and needs it.
At the end of writing all this down in a summary of my results, I want to thank all guys who helped me out with this issue.