code_str = """ #coding: utf-8 binlog_source = { 'db' : 'binlog', 'table': 'canal_canal_st', } use_global_id = True logical_table_list = ['applybinlog'] """ glo = {} loc = {} exec(code_str, glo, loc) print loc.keys()
python exec内置函数解析python代码
最新推荐文章于 2024-02-20 06:30:00 发布