how to import vairable from another script??

Please post any questions about developing your plugin here. Please use the search function before posting!
8guawong
Senior Member
Posts: 148
Joined: Sat Sep 20, 2014 3:06 am

how to import vairable from another script??

Postby 8guawong » Tue Dec 02, 2014 3:17 am

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)
User avatar
satoon101
Project Leader
Posts: 2697
Joined: Sat Jul 07, 2012 1:59 am

Postby satoon101 » Tue Dec 02, 2014 3:35 am

Image
8guawong
Senior Member
Posts: 148
Joined: Sat Sep 20, 2014 3:06 am

Postby 8guawong » Tue Dec 02, 2014 9:13 am

satoon101 wrote:I think this has been asked before:
http://forums.sourcepython.com/showthread.php?473&p=2212&viewfull=1#post2212


thanks

Return to “Plugin Development Support”

Who is online

Users browsing this forum: No registered users and 26 guests