コード例 #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
ファイル: _compat.py プロジェクト: CollinsMuiruri/Instagram
 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
ファイル: _compat.py プロジェクト: CollinsMuiruri/Instagram
 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)