This is a python library to parse extended display identification data (EDID).
This project based on pyedid
The EDID data frame format is described in detail on the Wikipedia page.
- Python 3.6+
- requests
pip3 install pyedid- Parsing EDID data from hex or bytes
- Embedded PNP ID registry with dump/restore to CSV file
- Updatable PNP ID registry from www.uefi.org
ToDO
importpyedidedid_hex= (
'00ffffffffffff000469982401010101''1e1b01031e351e78ea9265a655559f28''0d5054bfef00714f818081409500a940''b300d1c00101023a801871382d40582c''4500132b2100001e000000fd00324c1e''5311000a202020202020000000fc0056''533234380a20202020202020000000ff''0048374c4d51533132323136310a0000'
)
# returned Edid object, used the Default embedded registryedid=pyedid.parse_edid(edid_hex)
edid.name# 'VS248'edid.manufacturer# 'Ancor Communications Inc'edid.serial# 'H7LMQS122161'edid.year# 2017 (year of manufacture)edid.week# 30 (week of manufacture)edid.width# 53.0 cmedid.height# 30.0 cmedid.resolutions# list with resulutions (x, y, rate), ex (720, 400, 70.0)edid... # some other EDID datajson_str=str(edid) # making JSON string objectfrompyedidimportget_edid_from_xrandr_verbosefromsubprocessimportcheck_output# getting `xrandr --verbose` outputrandr=check_output(['xrandr', '--verbose'])
# parsing xrandr outputs to a bytes edid's listedids=get_edid_from_xrandr_verbose(randr)
# parsing edidedid=pyedid.parse_edid(edids[0])frompyedidimportRegistry, DEFAULT_REGISTRY# making a registry object from www.uefi.orgr_web=Registry.from_web()
# dumping the default registry to csv fileDEFAULT_REGISTRY.to_csv('/path/to/csv.file')
# restoring registry from csv filer_csv=Registry.from_csv('/path/to/csv.file')See LICENSE