Importing an os module under ten thousand different names does not cause any problems.
for i in range(10000): exec("import os as foo%i" % i) for i in range(10000): exec("foo%i.getcwd()" % i)
When importing to different classes:
for i in range(10000): exec("""class FooClass%i: import os as foo%i print foo%i.getcwd()""" % (i,i,i))
Both work without problems. Of course, this is not a guarantee, but at least it seems that you are not faced with immediate practical problems.
Junuxx
source share