代码记录
代码
exec/compile
version_file= 'Path/version.py'
def get_version():
with open(version_file,'r') as f:
exec(compile(f.read(),version_file,'exec))
return locals()['__version__']
version_file= 'Path/version.py'
def get_version():
with open(version_file,'r') as f:
exec(compile(f.read(),version_file,'exec))
return locals()['__version__']