Referring to a module by a string without using eval()
jeanbigboute at gmail.com
jeanbigboute at gmail.com
Wed May 17 21:10:22 EDT 2017
Thanks to all for the prompt replies. I look forward to trying both approaches.
I wasn't aware that subpackages such as numpy.random and such could be imported after numpy was imported at the top level. For some reason I thought it would cause confusion.
The functools.reduce and class approaches also look very powerful beyond my immediate need.
--- JBB
More information about the Python-list
mailing list