Page 1 of 1

how to import vairable from another script??

Posted: Tue Dec 02, 2014 3:17 am
by 8guawong
addons/source-python/plugins/test/test.py

Syntax: Select all

x = 30


addons/source-python/plugins/test2/test2.py

Syntax: Select all

from test import x


def load():
print(x)

Posted: Tue Dec 02, 2014 3:35 am
by satoon101

Posted: Tue Dec 02, 2014 9:13 am
by 8guawong
satoon101 wrote:I think this has been asked before:
http://forums.sourcepython.com/showthread.php?473&p=2212&viewfull=1#post2212


thanks