Created
February 18, 2013 12:17
-
-
Save pewerner/4976962 to your computer and use it in GitHub Desktop.
Accessing Static Variiables in an IronPython Class in seperate file
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class GlobalTest(): | |
def __init__(self): | |
pass | |
global globalTestVariable | |
globalTestVariable = "My Old Value" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
#append the path to sys | |
sys.path.append("C:\\mymodules") | |
#this is the name of the fil in my modules | |
import globaltest | |
#access the global static variable with the following syntas | |
globaltest.globalTestVariable = "My New Value" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment