def can_import(name):
    try:
        __import__(name)
        return True
    except ImportError:
        return False
Attempt to __import__ the specified package/module, returning
dataset/ETHPy150Open Pylons/pylons/pylons/commands.py/can_import