Did I find the right examples for you? yes no

All Samples(2)  |  Call(1)  |  Derive(0)  |  Import(1)

        def tryimport(modules, message=None):
    if isinstance(modules, str):
        modules = (modules,)

    for module in modules:
        try:
            return __import__(module, globals(), locals())
        except ImportError:
            pass

    if message is not None:
        warn(message)
        


src/m/i/mio-lang-0.1.8/mio/state.py   mio-lang(Download)
    def repl(self):
        from .utils import tryimport
 
        readline = tryimport("readline")