← Back to team overview

sikuli-driver team mailing list archive

[Question #258260]: Need global Var for mult scripts

 

New question #258260 on Sikuli:
https://answers.launchpad.net/sikuli/+question/258260

I am having trouble giving a variable scope into other scripts. I have a main script and multiple other scripts that it calls. I need the var to be declared in main and used in we'll call it test1. so in main... 

var = "whatever"
import test1

in test1... 

print "whatever"

I can use from main import var, however it reruns main in the process which I don't need. I also have a script that only contains functions, but I am not allowed to put the variable there per the project instructions. I am aware of some python instructions such as

var = "whatever"
test1.main(var)

but I am unable to get anything to work. Any ideas?




-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.