Skip to content

Instantly share code, notes, and snippets.

@anthonywu
Created December 2, 2020 06:12
Show Gist options
  • Save anthonywu/b6c26971a9fc6757d912dfc09e1247fd to your computer and use it in GitHub Desktop.
Save anthonywu/b6c26971a9fc6757d912dfc09e1247fd to your computer and use it in GitHub Desktop.
sample_plist_reader
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