Guest User

Untitled

a guest
Jun 12th, 2017
390
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.27 KB | None | 0 0
  1. import importlib
  2. module = importlib.import_module('math')
  3. if hasattr(module, '__all__'):
  4.     globals().update({n: getattr(module, n) for n in module.__all__}
  5. else:
  6.     globals.update({k: v for (k, v) in module.__dict__.items()
  7.                     if not k.startswith('_')})
Advertisement
Add Comment
Please, Sign In to add comment