Anyhow... once I execute say a particular file that imports from another and try to call a few methods from that class, I get something like this:
##running Loader.py >>> x = vectors() >>> x.load_Pos() Traceback (most recent call last): File "<pyshell#2>", line 1, in <module> x.load_Pos() File "C:\Python\workbench\2d_astro\Loader.py", line 25, in load_Pos Operator().set_posX(pos_x) TypeError: 'module' object is not callable
The code looks something like this:
#Loader.py import Operator class vectors(object): def load_Pos(self, pos_x = 0, pos_y = 0, pos_z = 0): Operator().set_posX(pos_x) Operator().set_posY(pos_y) Operator().set_posZ(pos_z) vector = [Operator().get_posX(), Operator().get_posY(), Operator().get_posZ()] return vector
Which is calling from this:
#Operator.py import math class functions(object): def set_posX(self, pos = 0): self.pos_x = pos def get_posX(self): return self.pos_x
I'm would be almost certain that I'm not typing out the proper syntactical form for calling other classes (in other files) or something, but I can't figure out exactly how python wants it to be as "input".
This post has been edited by BloodyInari: 30 January 2013 - 03:41 PM