TypeError: 'module object is not callable'
christophertidy at hotmail.com
christophertidy at hotmail.com
Mon Sep 3 12:13:28 EDT 2007
>
> The others spottet the error I missed. But I can offer something else:
>
> http://dirtsimple.org/2004/12/python-is-not-java.html
>
> It's a worthy read for someone coming from Java, needing time to adjust.
>
> Diez- Hide quoted text -
>
> - Show quoted text -
That deffinately was a useful read, thanks.
Thankyou to everyone who sorted these problems for me, I have
progressed very well
with this python program throughout the day now.
I have another little question before I finish today:
I am currently struggling to use a global variable in my static
functions. I'll explain further
Within my main.py file I have
class Main(object):
stepStore = StepStore()
@staticmethod
def createDepSteps():
....
stepStore.addStep([bol7, pre5])
.......
@staticmethod
def processSteps():
for step in stepStore.stepList[:]:
......
Main.createDepSteps()
Main.processSteps()
Trying this approach I am getting a error saying with the
processSteps() method, stepStore is undefined
To solve this problem I am currently passing in the processSteps()
parameter a stepStore instance created within createDepSteps()
but there is surely a way stepStore can be a global attribute which
can be accessed from both methods?
Any help would be much appreciated again
Cheers
Chris
More information about the Python-list
mailing list