Created
July 1, 2018 15:42
-
-
Save ptflp/93046a9ab7060201692d8bce3d2402e4 to your computer and use it in GitHub Desktop.
python bcdedit parser
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
идентификатор {bootmgr} | |
device partition=\Device\HarddiskVolume8 | |
path \EFI\Microsoft\Boot\bootmgfw.efi | |
description Windows Boot Manager | |
locale ru-RU | |
inherit {globalsettings} | |
default {current} | |
resumeobject {123123421} | |
displayorder {current} | |
{214214421} | |
toolsdisplayorder {memdiag} | |
timeout 15 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
file = open("1.txt", "r") | |
text=file.read() | |
d = {} | |
for line in text.split("\n"): | |
s = line.find(" ") | |
n = line[:s] | |
v = line[s:].strip() | |
d.update({n: v}) | |
print(d) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment