Return a byte representation of this structure
(self)
| 269 | return desc |
| 270 | |
| 271 | def pack(self): |
| 272 | """Return a byte representation of this structure""" |
| 273 | value_list = [] |
| 274 | for field in self.field_list: |
| 275 | value = self.value_dict[field] |
| 276 | if self.fmt_dict[field].endswith('s'): |
| 277 | value = six.ensure_binary(value) |
| 278 | value_list.append(value) |
| 279 | return struct.pack(self.format_str, *value_list) |
| 280 | |
| 281 | |
| 282 | class MBR(Struct): |
no outgoing calls