if sys.platform == 'win32':
    import win32_sysinfo as sysinfo
elif sys.platform == 'darwin':
    import mac_sysinfo as sysinfo
elif 'linux' in sys.platform:
    pass
How can I return system information in Python?