mirror of
https://github.com/opencv/opencv.git
synced 2024-12-16 02:19:12 +08:00
10 lines
262 B
Python
10 lines
262 B
Python
|
# flake8: noqa
|
||
|
import os
|
||
|
import sys
|
||
|
|
||
|
if sys.version_info[:2] >= (3, 0):
|
||
|
def exec_file_wrapper(fpath, g_vars, l_vars):
|
||
|
with open(fpath) as f:
|
||
|
code = compile(f.read(), os.path.basename(fpath), 'exec')
|
||
|
exec(code, g_vars, l_vars)
|