本文整理匯總了Python中Status.statusstr方法的典型用法代碼示例。如果您正苦於以下問題:Python Status.statusstr方法的具體用法?Python Status.statusstr怎麽用?Python Status.statusstr使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Status
的用法示例。
在下文中一共展示了Status.statusstr方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: storeM
# 需要導入模塊: import Status [as 別名]
# 或者: from Status import statusstr [as 別名]
def storeM(self, u):
(self.header['id'], self.header['qr'], self.header['opcode'],
self.header['aa'], self.header['tc'], self.header['rd'],
self.header['ra'], self.header['z'], self.header['rcode'],
self.header['qdcount'], self.header['ancount'],
self.header['nscount'], self.header['arcount']) = u.getHeader()
self.header['opcodestr'] = Opcode.opcodestr(self.header['opcode'])
self.header['status'] = Status.statusstr(self.header['rcode'])
for i in range(self.header['qdcount']):
# print 'QUESTION %d:' % i,
self.questions.append(self.storeQ(u))
for i in range(self.header['ancount']):
# print 'ANSWER %d:' % i,
self.answers.append(self.storeRR(u))
for i in range(self.header['nscount']):
# print 'AUTHORITY RECORD %d:' % i,
self.authority.append(self.storeRR(u))
for i in range(self.header['arcount']):
# print 'ADDITIONAL RECORD %d:' % i,
self.additional.append(self.storeRR(u))
示例2: storeM
# 需要導入模塊: import Status [as 別名]
# 或者: from Status import statusstr [as 別名]
def storeM(self,u):
(self.header['id'], self.header['qr'], self.header['opcode'],
self.header['aa'], self.header['tc'], self.header['rd'],
self.header['ra'], self.header['z'], self.header['rcode'],
self.header['qdcount'], self.header['ancount'],
self.header['nscount'], self.header['arcount']) = u.getHeader()
self.header['opcodestr']=Opcode.opcodestr(self.header['opcode'])
self.header['status']=Status.statusstr(self.header['rcode'])
for i in range(self.header['qdcount']):
#print 'QUESTION %d:' % i,
self.questions.append(self.storeQ(u))
for i in range(self.header['ancount']):
#print 'ANSWER %d:' % i,
self.answers.append(self.storeRR(u))
for i in range(self.header['nscount']):
#print 'AUTHORITY RECORD %d:' % i,
self.authority.append(self.storeRR(u))
for i in range(self.header['arcount']):
#print 'ADDITIONAL RECORD %d:' % i,
self.additional.append(self.storeRR(u))