rfceditor接口
rfcreader的Python项目详细描述
RFC读卡器
一个简单的python RFCEditor接口。
安装
来自PYPI回购:
pip install --user rfcreader
来自Github回购协议(不稳定)
pip install git+https://github.com/abstractequalsmagic/RFCReader.git
简单用法
- 将RFC作为文本获取
fromrfcreaderimportRFCrfc508=RFC(508)print(rfc508.text)
- 以PDF格式获取RFC
fromrfcreaderimportRFCrfc101=RFC(101)withopen("rfc101.pdf","wb")asstream:# Write the bytes to rfc101.pdf filestream.write(rfc101.pdf.read())
以及
fromrfcreaderimportRFCrfc27=RFC(27)print(rfc27.title)# Print the titleprint(rfc27.author)# Print the authorprint(rfc27.date)# Returns you datetime object