drives.py 文件源码

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

项目:LinkArchiever 作者: Mohamad1994HD 项目源码 文件源码
def get_drives():

    def get_win_drives():
        import win32api

        drives = win32api.GetLogicalDriveStrings()
        drives = drives.split('\000')[:-1]

        return drives

    def get_linux_drives():
        return []

    def get_mac_drives():
        return []

    def switch(case):
        return {'win': get_win_drives(),
                'linux': get_linux_drives(),
                'macosx': get_mac_drives()}[case]

    return switch(platform)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号