I want to refer to a variable in another python script -


a variable aa in aaa.py. want use variable in other python file bbb.py

how access variable?

you're looking modules!

in aaa.py:

aa = 'foo' 

in bbb.py:

import aaa print aaa.aa # or print(aaa.aa) python 3 # prints foo 

or works well:

from aaa import aa print aa # prints foo 

Comments

Popular posts from this blog

c# - Operator '==' incompatible with operand types 'Guid' and 'Guid' using DynamicExpression.ParseLambda<T, bool> -