forked from lowks/pythonpy
-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Russell91 edited this page Sep 5, 2014
·
17 revisions
$ py -h
usage: py [-h] [-x] [-fx] [-l] [-c PRE_CMD] [-C POST_CMD] [-V] [--ji]
[--jo] [--si INPUT_DELIMITER] [--so OUTPUT_DELIMITER] [--i]
[expression]
positional arguments:
expression
optional arguments:
-h, --help show this help message and exit
-x treat each row as x
-fx keep rows satisfying condition(x)
-l treat list of stdin as l
-c PRE_CMD run code before expression
-C POST_CMD run code after expression
-V, --version version info
--ji, --json_input pre-process each row with json.loads(row)
--jo, --json_output post-process each row with json.dumps(row)
--si INPUT_DELIMITER, --split_input INPUT_DELIMITER
pre-process each row with re.split(delimiter, row
--so OUTPUT_DELIMITER, --split_output OUTPUT_DELIMITER
post-process each row with delimiter.join(row)
--i, --ignore_exceptions
Wrap try-except-pass around each row
Please check out the pages panel for more advanced features.