This commit is contained in:
Jonathan Lange
2010-10-31 14:21:55 -04:00
parent 15ed60cb55
commit e764f02250

View File

@@ -1,5 +1,9 @@
# Copyright (c) 2010 Jonathan M. Lange. See LICENSE for details.
__all__ = [
'try_import',
]
def try_import(module_name, alternative=None):
"""Attempt to import `module_name`. If it fails, return `alternative`.