def get_platform_info(f):
    f.write('\n\n================PLATFORM INFORMATION================\n')
    f.write('Platform:  ')
    f.write(platform.system())
    f.write('\n')
    f.write('Operating System:  ')
    f.write(platform.platform())
    f.write('\n')
    f.write('Architecture:  ')
    f.write(str(platform.architecture()))
    f.write('\n')
    if  platform.system()=="Linux":
        try:
            pld = platform.linux_distribution()
            if(pld):
                f.write('Linux Distribution:  ')
                f.write(str(platform.linux_distribution()))
                f.write('\n')
        except Exception as exc:
            f.write('This Linux distribution does not support linux_distribution var:\n')
            f.write(str(exc))


    f.write('\n\n')
This function will capture specific platform information,
dataset/ETHPy150Open OpenMDAO/OpenMDAO-Framework/openmdao.util/src/openmdao/util/envirodump.py/get_platform_info