controllers.py 文件源码

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

项目:flight-stone 作者: asmateus 项目源码 文件源码
def deviceQuery(self):
        try:
            devices = comports()
            for d in devices:
                if len(d.hwid.split('PID')) > 1:
                    if d.hwid.split('PID')[1].split()[0][1:].lower() == self.device['identifier']:
                        self.device['port'] = d.device
                        return d.device
        except Exception:
            return None
        return None
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号