Created
December 2, 2020 06:12
-
-
Save anthonywu/b6c26971a9fc6757d912dfc09e1247fd to your computer and use it in GitHub Desktop.
sample_plist_reader
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
import os | |
import pathlib | |
import plistlib as pl | |
import pprint | |
f = 'com.apple.finder.plist' | |
with open(os.path.expanduser(pathlib.Path('~/Library/Preferences/') / f), 'rb') as fp: | |
data = pl.load(fp, fmt=pl.FMT_BINARY) | |
pprint.pprint(data) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment