代码记录

代码

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__']
posted @ 2024-05-17 11:15  AlexanderOscar  阅读(9)  评论(0编辑  收藏  举报