Re: [Tutor] Issue with classes

2012-06-12 Thread Peter Otten
Bod Soutar wrote: > 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 1

Re: [Tutor] Issue with classes

2012-06-12 Thread Devin Jeanpierre
On Tue, Jun 12, 2012 at 4:07 AM, Bod Soutar wrote: > 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? A smaller example: def foo(): mydict = {} bar() print mydict def bar(): mydict[3] =

Re: [Tutor] Issue with classes

2012-06-12 Thread Bod Soutar
On Jun 12, 2012 9:56 AM, "Andreas Perstinger" wrote: > > On Tue, 12 Jun 2012 09:07:13 +0100 > Bod Soutar wrote: > > > C:\>python cheatsheet.py --list > > done > > here? > > Traceback (most recent call last): > > File "cheatsheet.py", line 167, in > > main() > > File "cheatsheet.py", line

Re: [Tutor] Issue with classes

2012-06-12 Thread Andreas Perstinger
On Tue, 12 Jun 2012 09:07:13 +0100 Bod Soutar wrote: > C:\>python cheatsheet.py --list > done > here? > Traceback (most recent call last): > File "cheatsheet.py", line 167, in > main() > File "cheatsheet.py", line 165, in main > ca.parseArgs() > File "cheatsheet.py", line 39, in p

[Tutor] Issue with classes

2012-06-12 Thread Bod Soutar
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 main() File "cheatsheet.p