equal
deleted
inserted
replaced
14 import math |
14 import math |
15 from subprocess import check_call, Popen, CalledProcessError, STDOUT, PIPE |
15 from subprocess import check_call, Popen, CalledProcessError, STDOUT, PIPE |
16 # cannot use argparse, python 2.7 only |
16 # cannot use argparse, python 2.7 only |
17 from optparse import OptionParser |
17 from optparse import OptionParser |
18 |
18 |
19 DEFAULTVARIANTS = ['plain'] |
19 DEFAULTVARIANTS = ['plain', 'min', 'max', 'first', 'last', 'reverse', 'sort'] |
20 |
20 |
21 def check_output(*args, **kwargs): |
21 def check_output(*args, **kwargs): |
22 kwargs.setdefault('stderr', PIPE) |
22 kwargs.setdefault('stderr', PIPE) |
23 kwargs.setdefault('stdout', PIPE) |
23 kwargs.setdefault('stdout', PIPE) |
24 proc = Popen(*args, **kwargs) |
24 proc = Popen(*args, **kwargs) |