UNIX command-line tool for python line-based stream processing
Project description
Author: Pahaz Blinov
Repo: https://github.com/pahaz/py3line/
Pyline is a UNIX command-line tool for line-based processing in Python with regex and output transform features similar to grep, sed, and awk.
This project inspired by: piep, pysed, pyline, pyp and Jacob+Mark recipe
requirements: Python3
WHY I MAKE IT?
I sometimes have to use sed / awk. Not often, and so I always forget the necessary options and sed / awk DSL. But I now python, I like it, and I want use it for data processing. Default python -c is hard to write the kind of one-liner that works well.
- Why not a pyline?
Don`t support python3
Have many options (I want as much simple as possible solution)
Bad performance
Don`t support command chaining
- Why not a pysed?
Installation
py3line is on PyPI, so simply run:
pip install py3line
or
easy_install py3line
to have it installed in your environment.
For installing from source, clone the repo and run:
python setup.py install
Usage scenarios
…
Examples
Example 1: create spreadsheet
$ echo -e "Here are\nsome\nwords for you." | ./py3line.py "x.split()" -a "len(x)"
2
1
3
DOCS
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.