I have a program that needs to import some classes and functions from a package by using a certain version that I have as input.
For example:
while True:
version = input()
if version == '1.0.0':
import a, C from package_1_0_0
c = C()
a(c)
elif if version == '1.1.0':
import a, C from package_1_1_0
c = C()
a(c)
...
# Unload the package loaded above to accept a new one on the next iteration
# ...
So basically I need to load different versions of the package based on some input, load some functions and classes and unload everything waiting for the next input.