(self)
Loads a module.

            Raises ScriptError on failure, with argument equal to an error
            message that may be a formatted traceback.
Loads a module.
Loads a module .
def load(self):
        """
            Loads a module.

            Raises ScriptError on failure, with argument equal to an error
            message that may be a formatted traceback.
        """
        path = os.path.expanduser(self.path)
        if not os.path.exists(path):
            raise ScriptError("No such file: %s"%self.path)
        if not os.path.isfile(path):
            raise ScriptError("Not a file: %s"%self.path)
        ns = {}
        try:
            execfile(path, ns, ns)
        except Exception, v:
            raise ScriptError(traceback.format_exc(v))
        self.ns = ns
def load ( self ) : path = os . path . expanduser ( self . path ) if not os . path . exists ( path ) : raise ScriptError ( "No such file: %s" % self . path ) if not os . path . isfile ( path ) : raise ScriptError ( "Not a file: %s" % self . path ) ns = { } try : execfile ( path , ns , ns ) except Exception , v : raise ScriptError ( traceback . format_exc ( v ) ) self . ns = ns