python call function in same file(very newbie question)
hey guys,
I have just started writing some code in python and have hit a wall on a very basic question. I basically want to call a function I have written. My code is something like this: Code:
if __name__ = "__main__" Code:
def mySyntax(self): Code:
Traceback (most recent call last): Thanks |
i think you only supply 'self' argument in class functions.
hope it helps |
i have tried it without self too:
Code:
if __name__ = "__main__" Being a Java developer, my first instince was using self(like this in Java). I have tried all other options though and still cant seem to get past this small problem. If someone wants to have a look, you can check out the file at: http://cvs.sourceforge.net/viewcvs.p...v=1.1&view=log I would really appreciate some help in getting past this problem. Thanks |
All times are GMT -5. The time now is 02:52 PM. |