Code: Select all
test="text string"
Code: Select all
outDict['test'] = 'text string'
Code: Select all
outDict['test'] = test
Code: Select all
if 'test' in inDict:
test=inDict['test']
Code: Select all
def saveSequence():
module.setDefaults ( {'seq1': sequence} )
Code: Select all
sequence=[]
prefs = module.getDefaults()
Code: Select all
if prefs == {}:
# sequence =[1,2,3,4,5,6,7,8,9,2,10,11,12]
module.setDefaults ( {'seq1': [1,2,3,4,5,6,7,8,9,2,10,11,12]} )
else:
sequence = prefs['seq1']
print sequence
Code: Select all
outDict['test'] = 'text string'
Code: Select all
if 'test' in inDict:
test=inDict['test']
Code: Select all
print (test)
Code: Select all
NameError: name 'test' is not defined
Code: Select all
testVar = 123
print testVar
Code: Select all
(On button press...)testVar = 456
Code: Select all
outDict['STORE_TEST'] = testVar
Code: Select all
if 'STORE_TEST' in inDict:
testVar= inDict['STORE_TEST']
Code: Select all
print testVar
Users browsing this forum: No registered users and 18 guests
Copyright 2017 © garageCube. All Rights Reserved. Powered by phpBB® Forum Software © phpBB Limited.