예제 #1
0
 def execfile_(fname, *args):
     """ Overriding PY2 execfile() implementation to support .pyc files """
     if fname.endswith(".pyc"):
         return six.exec_(_get_codeobj(fname), *args)
     return execfile(fname, *args)
예제 #2
0
 def execfile_(fname, *args):
     """ Overriding PY2 execfile() implementation to support .pyc files """
     if fname.endswith(".pyc"):
         return six.exec_(_get_codeobj(fname), *args)
     return execfile(fname, *args)
예제 #3
0
 def execfile_(fname, *args):
     if fname.endswith(".pyc"):
         code = _get_codeobj(fname)
     else:
         code = compile(open(fname, 'rb').read(), fname, 'exec')
     return six.exec_(code, *args)
예제 #4
0
 def execfile_(fname, *args):
     if fname.endswith(".pyc"):
         code = _get_codeobj(fname)
     else:
         code = compile(open(fname, 'rb').read(), fname, 'exec')
     return six.exec_(code, *args)