def get_dmi_data(path, dest, parser): if(os.path.isfile(path)): dmi = DMI(path) with open(dest, 'w') as f: f.write(dmi.getHeader())