Skip to content

Instantly share code, notes, and snippets.

@ptflp
Created July 1, 2018 15:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ptflp/93046a9ab7060201692d8bce3d2402e4 to your computer and use it in GitHub Desktop.
Save ptflp/93046a9ab7060201692d8bce3d2402e4 to your computer and use it in GitHub Desktop.
python bcdedit parser
идентификатор {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
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