sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #11282
[Question #200874]: Exiting a function, in an imported module.
New question #200874 on Sikuli:
https://answers.launchpad.net/sikuli/+question/200874
I have a main script, which import some modules.
The main script contains a while loop (inside a try:), calling the modules in turn.
The modules contains functions.
Now inside the modules I need some if sentences, which if false, will stop the module and exit to the while loop, but not break the while loop. (Which happens if you use, for instance, exit(1) )
Is that possible?
____________________________________________________________________________
Two other module related questions:
_______
This should eliminate the need to restart sikuli, when you change something in modulename:
import modulename
reload(modulename)
But I get an error in the reload line, does this not work with windows?
_______
Is there a way you can declare a global variable across modules?
Like in a module called pcname, you would examine current pcname and declare it:
global pcName = "computer01"
And use it later in another module called logging.
Like a simple paste(pcName)
I've looked at a few threads on this, suggesting to use the settings class, but the solutions eludes me..
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.