这是一个python库,用于解析扩展显示标识数据(edid)

pyedid的Python项目详细描述


pyedid

这是一个python库,用于解析扩展显示标识数据(edid)

EDID数据格式

edid数据帧格式在其Wikipedia page中有详细描述。

入门

设置

来自PYPI

>>> pip install pyedid

或来自Github

>>> git clone https://github.com/dadmoscow/pyedid
>>> python pyedid/setup.py install

功能

  • 接收和解密EDID数据
  • 在线转换制造商ID,转储注册表到本地CSV
  • 用作shell实用程序
  • 没有第三方依赖关系

使用

作为图书馆

frompyedid.edidimportEdidfrompyedid.helpers.edid_helperimportEdidHelperfrompyedid.helpers.registryimportRegistry#### Step 1: loading registry# load pnp registry from http://www.uefi.org/pnp_id_listregistry=Registry.from_web()# or loading from local csv fileregistry=Registry.from_csv('/tmp/foo.csv')# load from web and dump to csvregistry=Registry.from_web().to_csv('/tmp/bar.csv')# only updateRegistry.from_web().to_csv('/tmp/bar.csv')#### Step 2: loading edid data# loading list with edid dataedid_bs=EdidHelper.get_edids()[0]# convert exist edid hex string from xrandredid_bs=EdidHelper.hex2bytes("hex string from xrandr...")#### Step 3: create instance# create Edid instance for fisrt edid dataedid=Edid(edid_bs,registry)print(edid)# Edid(# 	dpms_activeoff=True,# 	dpms_standby=True,# 	dpms_suspend=True,# 	edid_version=1.3,# 	gamma=2.2,# 	height=30.0,# 	manufacturer=Ancor Communications Inc,# 	manufacturer_id=1129,# 	name=VS248,# 	product=38948,# 	raw=b'\x00\xff\xff\xff\xff\xff\xff\x00\x04i\x98$\x01\x01\x01\x01\x1e\x1b\x01\x03\x1e5\x1ex\xea\x92e\xa6UU\x9f(\rPT\xbf\xef\x00qO\x81\x80\x81@\x95\x00\xa9@\xb3\x00\xd1\xc0\x01\x01\x02:\x80\x18q8-@X,E\x00\x13+!\x00\x00\x1e\x00\x00\x00\xfd\x002L\x1eS\x11\x00\n      \x00\x00\x00\xfc\x00VS248\n       \x00\x00\x00\xff\x00H7LMQS122161\n\x00\x00',# 	resolutions=[(720, 400, 70.0), (720, 400, 88.0), (640, 480, 60.0), (640, 480, 67.0), (640, 480, 72.0), (640, 480, 75.0), (800, 600, 56.0), (800, 600, 60.0), (800, 600, 70.0), (800, 600, 75.0), (832, 624, 75.0), (1024, 768, 87.0), (1024, 768, 60.0), (1024, 768, 72.0), (1024, 768, 75.0), (1152, 864, 75.0), (1280, 1024, 60.0), (1280, 960, 60.0), (1440, 900, 60.0), (1600, 1200, 60.0), (1680, 1050, 60.0), (1920, 1080, 60.0)],# 	serial=H7LMQS123181,# 	type=digital,# 	width=53.0,# 	year=2017# )

作为系统实用程序

>>> pyedid

# Loading registry from web...# Done!# Edid(# 	dpms_activeoff=True,# 	dpms_standby=True,# 	dpms_suspend=True,# 	edid_version=1.3,# 	gamma=2.2,# 	height=30.0,# 	manufacturer=Ancor Communications Inc,# 	manufacturer_id=1129,# 	name=VS248,# 	product=38948,# 	raw=b'\x00\xff\xff\xff\xff\xff\xff\x00\x04i\x98$\x01\x01\x01\x01\x1e\x1b\x01\x03\x1e5\x1ex\xea\x92e\xa6UU\x9f(\rPT\xbf\xef\x00qO\x81\x80\x81@\x95\x00\xa9@\xb3\x00\xd1\xc0\x01\x01\x02:\x80\x18q8-@X,E\x00\x13+!\x00\x00\x1e\x00\x00\x00\xfd\x002L\x1eS\x11\x00\n      \x00\x00\x00\xfc\x00VS248\n       \x00\x00\x00\xff\x00H7LMQS122161\n\x00\x00',# 	resolutions=[(720, 400, 70.0), (720, 400, 88.0), (640, 480, 60.0), (640, 480, 67.0), (640, 480, 72.0), (640, 480, 75.0), (800, 600, 56.0), (800, 600, 60.0), (800, 600, 70.0), (800, 600, 75.0), (832, 624, 75.0), (1024, 768, 87.0), (1024, 768, 60.0), (1024, 768, 72.0), (1024, 768, 75.0), (1152, 864, 75.0), (1280, 1024, 60.0), (1280, 960, 60.0), (1440, 900, 60.0), (1600, 1200, 60.0), (1680, 1050, 60.0), (1920, 1080, 60.0)],# 	serial=H7LMQS123181,# 	type=digital,# 	width=53.0,# 	year=2017# )

许可

请参见许可证

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java将Map<String,String>传递给需要Map<String,Object>   java在循环中使用字符串而不是StringBuilder是否会造成内存损失?   jnlp如何更新java控制台JRE?   java更改、修改和重新打包CXFAPI源文件   JavaFXJava应用程序在Fedora上运行一段时间后关闭   使用来自不同类的方法的java   java如何通过ant脚本在linux中使用subst?   java在使用camunda modeler进行base64编码/解码时出错   获取java。netbeans、weblogic和fastswap设置为true时的lang.NoSuchMethodError   java如何提高FinalizerThread在GC中收集对象的优先级   java检测具有相同根的单词   netbeans crud应用程序中的java错误