直接在 python 中读取 MBR 和 GPT 分区。
项目描述
pyreadpartitions
直接在 python 中读取 MBR 和 GPT 分区。
例子:
from pyreadpartitions import get_disk_partitions_info
with open('/dev/sda', 'rb') as fp:
info = get_disk_partitions_info(fp)
print(info.mbr)
print(info.gpt)
from pyreadpartitions import show_disk_partitions_info
with open('/dev/sda', 'rb') as fp:
show_disk_partitions_info(fp)
控制台脚本也可用:
$ sudo cat /dev/sda | pyreadpartitions
或者如果您已经可以访问文件或直接访问磁盘:
# pyreadpartitions /dev/sda
项目详情
关
pyreadpartitions -1.1.1.tar.gz 的哈希值
| 算法 | 哈希摘要 | |
|---|---|---|
| SHA256 | 4ccd8b16e8e3d0d53b6933eab19cc8f95bc8020003749a7fdf238170ec11e631 |
|
| MD5 | 0ef6ca03c8895d1f059ee131931c3052 |
|
| 布莱克2-256 | 5f2fe2dcbdbf0f224c452956cf6f0af7d342b7c8fba3e97b9fbc904a91fa226c |
关
pyreadpartitions -1.1.1-py2.py3-none-any.whl 的哈希值
| 算法 | 哈希摘要 | |
|---|---|---|
| SHA256 | 3169e872e14142c014f953052df3af20616227633ce1e5ac7946d4b1b4c04740 |
|
| MD5 | 4e172aa1e79dc3321a9e7b6f6e372a5a |
|
| 布莱克2-256 | 486257d5f4ef596785878fd8c21901f7219455f71db8e7eab7ebf3f515257e7f |