Skip to content

Instantly share code, notes, and snippets.

View gokselkoksal's full-sized avatar

Göksel Köksal gokselkoksal

View GitHub Profile
@kristopherjohnson
kristopherjohnson / sortplist.py
Created April 28, 2012 16:11
Given an XML plist on standard input, write back to standard output with keys sorted
#!/usr/bin/python
#
# Reads plist from standard input and writes it back to standard output
# sorted by key.
from plistlib import readPlist, writePlist
from sys import stdin, stdout
plist = readPlist(stdin)
writePlist(plist, stdout)