本文整理匯總了Python中Struct.Struct.string方法的典型用法代碼示例。如果您正苦於以下問題:Python Struct.string方法的具體用法?Python Struct.string怎麽用?Python Struct.string使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Struct.Struct
的用法示例。
在下文中一共展示了Struct.string方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: __format__
# 需要導入模塊: from Struct import Struct [as 別名]
# 或者: from Struct.Struct import string [as 別名]
def __format__(self):
self.Zeroes = Struct.uint8[0x40]
self.IMET = Struct.string(4)
self.Fixed = Struct.uint8[8]
self.Sizes = Struct.uint32[3]
self.Flag1 = Struct.uint32
self.Names = Struct.string(0x2A<<1, encoding='utf-16-be', stripNulls=True)[7]
self.Zeroes = Struct.uint8[0x348]
self.Crypto = Struct.uint8[0x10]
示例2: __format__
# 需要導入模塊: from Struct import Struct [as 別名]
# 或者: from Struct.Struct import string [as 別名]
def __format__(self):
self.magic = Struct.string(4)
self.magic2 = Struct.string(4)
self.length = Struct.uint32
self.chunk_cnt = Struct.uint32
self.unknown01 = Struct.uint8
self.unknown02 = Struct.uint8
self.unknown03 = Struct.uint16
self.unknown04 = Struct.uint32
self.unknown05 = Struct.uint32
self.unknown06 = Struct.uint32
示例3: __format__
# 需要導入模塊: from Struct import Struct [as 別名]
# 或者: from Struct.Struct import string [as 別名]
def __format__(self):
self.Magic = Struct.string(4)
self.Length = Struct.uint32
self.Unk1 = Struct.uint32
self.Unk2 = Struct.uint32
self.Unk3 = Struct.uint16
self.Unk4 = Struct.uint16
self.Unk5 = Struct.uint16
self.Unk6 = Struct.uint16
self.Float1 = Struct.float
self.Float2 = Struct.float
self.Float3 = Struct.float
self.Float4 = Struct.float
self.Float5 = Struct.float
self.Float6 = Struct.float
self.Float7 = Struct.float
self.Float8 = Struct.float
self.Float9 = Struct.float
self.FloatA = Struct.float
self.Unk7 = Struct.uint32
self.Unk8 = Struct.uint32
self.Unk9 = Struct.uint32
self.UnkA = Struct.uint32
示例4: __format__
# 需要導入模塊: from Struct import Struct [as 別名]
# 或者: from Struct.Struct import string [as 別名]
def __format__(self):
self.magic = Struct.uint32
self.rootnode_offset = Struct.uint32
self.header_size = Struct.uint32
self.data_offset = Struct.uint32
self.zeroes = Struct.string(16)
示例5: __format__
# 需要導入模塊: from Struct import Struct [as 別名]
# 或者: from Struct.Struct import string [as 別名]
def __format__(self):
self.magic = Struct.string(4)
self.version = Struct.uint32
self.length = Struct.uint32
self.header_size = Struct.uint16
self.chunk_cnt = Struct.uint16