Ubuntu Pastebin

Paste from al at Sun, 11 Jan 2015 19:10:04 +0000

Download as text
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
#!/usr/bin/env python

import sys

f = file(sys.argv[1])

for line in f:
    if ".button:active" in line:
        newline = line.replace(".button:active", ".button:checked")
        if line.endswith(' {\n'):
            newline = newline.replace(' {', ',')
        sys.stdout.write(newline)
    sys.stdout.write(line)
Download as text