當前位置: 首頁>>代碼示例>>Python>>正文


Python Struct.string方法代碼示例

本文整理匯總了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]
開發者ID:HACKERCHANNEL,項目名稱:benzin,代碼行數:11,代碼來源:Alameda.py

示例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
開發者ID:HACKERCHANNEL,項目名稱:Wii.py,代碼行數:13,代碼來源:bmg.py

示例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
開發者ID:Meorge,項目名稱:EnvironmentEditor,代碼行數:25,代碼來源:bdof.py

示例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)
開發者ID:Meorge,項目名稱:EnvironmentEditor,代碼行數:8,代碼來源:arc.py

示例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
開發者ID:HACKERCHANNEL,項目名稱:Wii.py,代碼行數:8,代碼來源:breft.py


注:本文中的Struct.Struct.string方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。