So I'm working on implementing a websocket client protocol on a robot called NAO. Without going into too many details, I can't do a normal import because a variable is needed before I can do any import statements, so I need to handle my import statements in a method.
Problem is is that I need these packages across multiple classes in a single file, and therefore I REALLY need to make these imports global.
Now I found another StackOverflow post handling pretty much the same thing:
Python: how to make global imports from a function
However, this post only handles regular imports, not class imports (there is probably a correct name for this, but I don't know it)
Does anybody have an idea on how to handle this?