Not sure if i'm interpreting your question correctly, but why don't you just return the variabe?
def create_something(self):
variable = loader.loadModel('myModel.bam')
variable.setPos(123,1231,5)
return variable
And to access it in variable
:
variable = secondFile().create_something()
If you want it to be more like OOP, you should bound variable
to self:
def create_something(self):
self.variable = loader.loadModel('myModel.bam')
self.variable.setPos(123,1231,5)
And then, to access it:
SF = secondFile()
SF.create_something()
variable = SF.variable