USBIP.py 文件源码

python
阅读 21 收藏 0 点赞 0 评论 0

项目:PythonUSBIP 作者: Frazew 项目源码 文件源码
def formatDevicesList(self, devicesCount):

        pack_format = '>'
        i = 0
        for field in self._fields_:
            if (i == devicesCount + 2):
                break
            if type(field[1]) is types.InstanceType:
                if BaseStucture in field[1].__class__.__bases__:
                    pack_format += str(field[1].size()) + 's'
            elif 'si' == field[1]:
                pack_format += 'c'
            elif '<' in field[1]:
                pack_format += field[1][1:]
            else:
                pack_format += field[1]
            i += 1
        return pack_format
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号