PGP SIGNED MESSAGE
Hash: SHA1
Hi Everyone,
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 grabbed
an instance of TriggerMessage.
Any ideas on this?
The class in question is:
class TriggerMessage(object):
def __init__(self,data):
"""
Unpacks the passed binary data based on the MQTCM2 format dictated in
the MQ Application Programming Reference
"""
self.data=data
self.structid=None
self.version=None
self.qname=None
self.procname=None
self.trigdata=None
self.appltype=None
self.applid=None
self.envdata=None
self.userdata=None
self.qmgr=None
def decode(self):
import struct
format='4s 4s 48s 48s 64s 4s 256s 128s 128s 48s'
size=struct.calcsize(format)
self.data=data
self.structid, self.version, self.qname, self.processname, \
self.triggerdata, self.appltype, self.applid, \
self.envdata, self.userdata, self.qmgr \
= struct.unpack(format,self.data)
- --
Thank you,
Andrew Robert
Systems Architect
Information Technologies
MFS Investment Management
Phone: 617-954-5882
E-mail: arobert (AT) mfs (DOT) com
Linux User Number: #201204
PGP SIGNATURE
Version: GnuPG v1.4.3 (MingW32)
0KteYe8olY5/72+uktGRCco=
=ToBq
PGP SIGNATURE
Tutor maillist - Tutor (AT) python (DOT) org