I have function ImgplaneDone() declared at global level
but when I try to call the function from within the class like this
Even though the ImgplaneDone() is at the same level as main() function is (not inside main function)
I get error # NameError: name 'ImgplaneDone' is not defined # , the weirdest thing is i only get error if I run the script like this
but if i load it in the script editor and press ctrl + enter then evrything works fine.,...
the second problem I couldnt understand why is it happening I have created an instance of the class that contains GUI framework and call the function create from main() function,
Now even though I have this code at the end
if __name__ == '__main__':
i still have to make a call like setimgpln.main() from shelf button or command line at bottom instead of just setimgpln.