weakcat.py 文件源码

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

项目:weakmon 作者: rtmrtmrtmrtm 项目源码 文件源码
def comports():
    a = serial.tools.list_ports.comports()
    if len(a) == 0:
        return [ ]
    if type(a[0]) == tuple:
        b = [ ]
        for aa in a:
            b.append(aa[0])
        return b
    else:
        b = [ ]
        for aa in a:
            b.append(aa.device)
        return b

# print serial ports and radio types.
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号