LOCAL_SRC_FILES указывает на отсутствующий файл

Лучший способ, я думаю, из официальной документации ( 29.1. imp - доступ к внутренним импортам ):

import imp
import sys

def __import__(name, globals=None, locals=None, fromlist=None):
    # Fast path: see if the module has already been imported.
    try:
        return sys.modules[name]
    except KeyError:
        pass

    # If any of the following calls raises an exception,
    # there's a problem we can't handle -- let the caller handle it.

    fp, pathname, description = imp.find_module(name)

    try:
        return imp.load_module(name, fp, pathname, description)
    finally:
        # Since we may exit via an exception, close fp explicitly.
        if fp:
            fp.close()

-10
задан CtheW 14 September 2012 в 06:18
поделиться