Exemplo n.º 1
0
def execFile(filename, localVars=defLocals, globalVars=defGlobals, then=None):
    #fid = open(checkFilename(filename))
    #code = fid.read()
    #fid.close()

    _execfile(filename, localVars, globalVars)
    if then is not None:
        then()
Exemplo n.º 2
0
    def __init__(self, filename=None, mdToCopy=None):
        if not filename is None:
            from PYME.util.execfile import _execfile
            try:
                import cPickle as pickle
            except ImportError:
                import pickle

            #loading an existing file
            md = self
            fn = __file__
            globals()['__file__'] = filename
            _execfile(filename, locals(), globals())
            globals()['__file__'] = fn

        if not mdToCopy is None:
            self.copyEntriesFrom(mdToCopy)
Exemplo n.º 3
0
def execFile(filename, localVars=defLocals, globalVars=defGlobals):
    #fid = open(checkFilename(filename))
    #code = fid.read()
    #fid.close()

    _execfile(filename, localVars, globalVars)