variables.py进口变量在python的功能
path="c:/something"
path2="c:/somethng2"
path3="c:/something3"
....
main.py
def run():
from variables import *
...
我有这样的错误:
SyntaxError: import * is not allowed in function 'run' because it contains a nested function with free variables
'import variables'比使用'variables.path,variables.path2,....' –