Last active
October 6, 2016 02:27
-
-
Save vmorris/df4399cd89147e4ee6d4983fcc77d879 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
modules = { | |
'sys': 'sys', | |
'os': 'os', | |
'time': 'time', | |
'foo': 'foo', | |
'bar': 'bar' | |
} | |
for module in modules: | |
try: | |
modules[module] = __import__(module) | |
except ImportError as e: | |
print "Hey dude! {0}".format(e.message) | |
print modules['sys'].byteorder | |
print modules['os'].name | |
print modules['time'].time() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment