So this is probably a hack, but I've been using eval(str)
to obtain an static object, kind of a contradiction, in python 3.
There is an Records.py file that has nothing but class
objects defined with static methods and constructors that save some arguments. Then from another .py file I import Records
but i need to dynamically select each object and then instantiate it on demand according to the type of data being read in.
So where object_name = 'RecordOne'
or the class name, I call cur_type = eval(object_name)
and then to instantiate it you do cur_inst = cur_type(args)
However before you instantiate you can call static methods from cur_type.getName()
for example, kind of like abstract base class implementation or whatever the goal is. However in the backend, it's probably instantiated in python and is not truly static, because eval is returning an object....which must have been instantiated....that gives static like behavior.