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

I have 2 files that need to call functions from each other. The problem is that 
I get an error

NameError: global name 'main' is not defined

my two files are as follows (i have cut out a bunch of stuff to narrow in on 
the issue)

sarkoth.sikuli

import general
from sikuli import *
from general import *


def main():
    do things
     leave()
         
    else:
        leave()

runs=0
while runs>=0:
    main()



general.sikuli

from sikuli import *

def leave():
    type("t")
    main()




sarkoth.sikuli is where my script is run from and it will call leave() which is 
located in my general.sikuli. The leave function executes but then gets hung up 
when its time for it to call main() from sarkoth.sikuli


i've also tried adding to the general.sikuli but it still doesn't work.

import sarkoth
reload(sarkoth)
from sarkoth import *


anyone have ideas?

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

_______________________________________________
Mailing list: https://launchpad.net/~sikuli-driver
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp

Reply via email to