Re: [Tutor] help with 'organization'

2011-08-25 Thread Steven D'Aprano
John wrote: I know a code example might help, so I try to show it here (my code I'm afraid is too complex and ugly at the moment). You can see the it fails because MyTools doesn't have 'this' attribute... Then give it one. class MyTools: Add an initialisation method: def __init__(self

Re: [Tutor] help with 'organization'

2011-08-25 Thread James Reynolds
On Thu, Aug 25, 2011 at 1:51 PM, John wrote: > Hello, I am writing a module that will have two classes ('runners') I > am calling them, as they will ultimately use subprocess to run a > command line program, so they are basically option parsers, etc... > > As I wrote the second 'runner', I realiz

Re: [Tutor] help with 'organization'

2011-08-25 Thread John
Ha! Inheritance! On Thu, Aug 25, 2011 at 7:51 PM, John wrote: > Hello, I am writing a module that will have two classes ('runners') I > am calling them, as they will ultimately use subprocess to run a > command line program, so they are basically option parsers, etc... > > As I wrote the second '

[Tutor] help with 'organization'

2011-08-25 Thread John
Hello, I am writing a module that will have two classes ('runners') I am calling them, as they will ultimately use subprocess to run a command line program, so they are basically option parsers, etc... As I wrote the second 'runner', I realized many of the methods are going to be the same as the f