why do I get name not defined error

Peter Otten __peter__ at web.de
Wed Feb 18 18:22:36 CET 2009


zaheer.agadi at gmail.com wrote:

>  I have the following declared in my class, I am trying tp call a
> method defined in the same class
> I am not sure why I am getting name not defined error
 
Assuming this is part of a method

def method(self):
>     if options.uploadFile != None :
>         print "This is path", the_rest
>         filePath = the_rest
>         UploadFile(None,filePath)

you have to change the above line to

          self.UploadFile(filePath)
 

Now consider reading a tutorial before you proceed.

Peter



More information about the Python-list mailing list