Skip to content

Instantly share code, notes, and snippets.

@pewerner
Created February 18, 2013 12:17
Show Gist options
  • Save pewerner/4976962 to your computer and use it in GitHub Desktop.
Save pewerner/4976962 to your computer and use it in GitHub Desktop.
Accessing Static Variiables in an IronPython Class in seperate file
class GlobalTest():
def __init__(self):
pass
global globalTestVariable
globalTestVariable = "My Old Value"
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