Re: [Tutor] Need help with using methods in a base class

2008-09-08 Thread Kent Johnson
On Mon, Sep 8, 2008 at 9:21 AM, Roy Khristopher Bayot <[EMAIL PROTECTED]> wrote: > Hi. It worked. :-) class LightsHandle(Parallel): > ... def __init__(self): > ... Parallel.__init__(self) > ... def __del__(self): > ... Parallel.__del__(self) These two methods

Re: [Tutor] Need help with using methods in a base class

2008-09-08 Thread Roy Khristopher Bayot
Hi. It worked. >>> class LightsHandle(Parallel): ... def __init__(self): ... Parallel.__init__(self) ... def __del__(self): ... Parallel.__del__(self) ... def setLatch(self, x, y, z): ... self.setDataStrobe(x) ... print 'Data Strobe set.

Re: [Tutor] Need help with using methods in a base class

2008-09-07 Thread Kent Johnson
On Sun, Sep 7, 2008 at 11:07 AM, Roy Khristopher Bayot <[EMAIL PROTECTED]> wrote: > Hi. I added self to parts of the code. But after making an instance and > using the setData method it gave out an AttributeError. > from parallel import Parallel class LightsHandle(Parallel): > ... def

Re: [Tutor] Need help with using methods in a base class

2008-09-07 Thread Roy Khristopher Bayot
Hi. I added self to parts of the code. But after making an instance and using the setData method it gave out an AttributeError. >>> from parallel import Parallel >>> class LightsHandle(Parallel): ... def __init__(self): ... pass ... def setData(self, data): ... Para

Re: [Tutor] Need help with using methods in a base class

2008-09-06 Thread Alan Gauld
"Roy Khristopher Bayot" <[EMAIL PROTECTED]> wrote ... def generateClockPulse(self): ... parallel.Parallel.setSelect(0) ... parallel.Parallel.setSelect(1) ... a = LightsHandle() a.setD(0xF0) Traceback (most recent call last): File "", line 1, in File "", line 5,

Re: [Tutor] Need help with using methods in a base class

2008-09-06 Thread Kent Johnson
On Sat, Sep 6, 2008 at 12:04 PM, Roy Khristopher Bayot <[EMAIL PROTECTED]> wrote: > Hi. I am having some difficulty using methods from a base class. > > I have 2 classes. The first one is Parallel which is inside the module > parallel. The methods useful to me from this class are setDataStrobe(), >

[Tutor] Need help with using methods in a base class

2008-09-06 Thread Roy Khristopher Bayot
Hi. I am having some difficulty using methods from a base class. I have 2 classes. The first one is Parallel which is inside the module parallel. The methods useful to me from this class are setDataStrobe(), setAutoFeed(), setInitOut(), setSelect(), and setData(). The second one is derived from t