Re: Class probkem - getting msg that self not defined

2006-05-23 Thread bruno at modulix
Andrew Robert wrote: > Hey Bruno, > > > Although I have not tested it, this appears to be it exactly. > > > Some confusion though. > > > > >>import struct >> >>class TriggerMessage(object): >>def __init__(self,data): >>""" >>Unpacks the passed binary data based on the >

Re: Class probkem - getting msg that self not defined

2006-05-22 Thread Andrew Robert
Hey Bruno, Although I have not tested it, this appears to be it exactly. Some confusion though. > import struct > > class TriggerMessage(object): > def __init__(self,data): > """ > Unpacks the passed binary data based on the > MQTCM2 format dictated in >

Re: Class probkem - getting msg that self not defined

2006-05-22 Thread Bruno Desthuilliers
Andrew Robert a écrit : > Hi Everyone, > > I am having a problem with a class and hope you can help. > > When I try to use the class listed below, I get the statement that self > is not defined. > > test=TriggerMessage(data) > var = test.decode(self.qname) > > I would have thought

Re: Class probkem - getting msg that self not defined

2006-05-22 Thread Dennis Benzinger
wes weston schrieb: > Andrew Robert wrote: > >> wes weston wrote: >> >>> Andrew Robert wrote: >>> Hi Everyone, I am having a problem with a class and hope you can help. When I try to use the class listed below, I get the statement that self is not defined.

Re: Class probkem - getting msg that self not defined

2006-05-22 Thread wes weston
Andrew Robert wrote: > wes weston wrote: >> Andrew Robert wrote: >>> Hi Everyone, >>> >>> I am having a problem with a class and hope you can help. >>> >>> When I try to use the class listed below, I get the statement that self >>> is not defined. >>> >>> test=TriggerMessage(data) >> self i

Re: Class probkem - getting msg that self not defined

2006-05-22 Thread Andrew Robert
wes weston wrote: > Andrew Robert wrote: >> Hi Everyone, >> >> I am having a problem with a class and hope you can help. >> >> When I try to use the class listed below, I get the statement that self >> is not defined. >> >> test=TriggerMessage(data) > > self is not known here; only inside

Re: Class probkem - getting msg that self not defined

2006-05-22 Thread wes weston
Andrew Robert wrote: > Hi Everyone, > > I am having a problem with a class and hope you can help. > > When I try to use the class listed below, I get the statement that self > is not defined. > > test=TriggerMessage(data) self is not known here; only inside the class. > var = tes

Class probkem - getting msg that self not defined

2006-05-22 Thread Andrew Robert
Hi Everyone, I am having a problem with a class and hope you can help. When I try to use the class listed below, I get the statement that self is not defined. test=TriggerMessage(data) var = test.decode(self.qname) I would have thought that self would have carried forward when I