Hi, I am having some difficulty calling a class method from a different class. When I run the attached script like this "python cheatsheet.py --list"
C:\>python cheatsheet.py --list done here? Traceback (most recent call last): File "cheatsheet.py", line 167, in <module> main() File "cheatsheet.py", line 165, in main ca.parseArgs() File "cheatsheet.py", line 39, in parseArgs self.argList() File "cheatsheet.py", line 96, in argList handle = cf.load() NameError: global name 'cf' is not defined So the traceback points to the issue being on line 96, specifically the call to cf.load(). cf.load() (line 147) is part of the cheatFile class (line 125), and is instantiated with cf = cheatFile() (line 161) I confess I don't know anything about classes really so I'm probably doing something stupid, but can anyone point me in the right direction? Thanks, Bodsda
cheatsheet.py
Description: Binary data
_______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor