Not sure if my python question is titled correctly, but I get a NameError: global name 'someOtherClass' is not defined
error when I try to call a method that uses a module imported through the __init__
function of my class.
class myClass
def __init__(self):
if is_64b:
exit()
else:
import someOtherClass
def myMethod(self, param1, param2, param3):
return someOtherClass.someMethod(param1, param2, param3)
from myFolder.myClassFileName import myClass
myObj = myClass()
value = myObj.myMethod(p1, p2, p3)