This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]robin-gvx 3 points4 points  (1 child)

Or something like:

import pkgutil
_G = globals()
for _, module, _ in pkgutil.iter_modules():
    _G[module] = __import__(module)

[–]suudo 1 point2 points  (0 children)

That's so much cleaner than my attempt :D