util.py 文件源码

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

项目:radar 作者: amoose136 项目源码 文件源码
def get_platform():
    """ get_platform()

    Get a string that specifies the platform more specific than
    sys.platform does. The result can be: linux32, linux64, win32,
    win64, osx32, osx64. Other platforms may be added in the future.
    """
    # Get platform
    if sys.platform.startswith('linux'):
        plat = 'linux%i'
    elif sys.platform.startswith('win'):
        plat = 'win%i'
    elif sys.platform.startswith('darwin'):
        plat = 'osx%i'
    else:  # pragma: no cover
        return None

    return plat % (struct.calcsize('P') * 8)  # 32 or 64 bits
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号