Skip to main content

pyclitool is a command line utility that allow you to map/filter/reduce your input with a Python one liner, line by line.

Project description

pyclitool is a command line utility that allow you to map/filter/reduce your input with a Python one liner, line by line.

Installing:

sudo pip install pyclitool

Usage:

Here are some powerful examples of what you can do with the py command line utility.

Calculate the length of the file names in your current directory:

`bash ls | py "len(x)" `

Sum a list of numbers using a reduce function:

`bash echo -n "1\n2\n3\n4\n5\n" | py -r "int(x)+int(y)" `

Filter only lines from a CSV which the sixth column is greater than 3, skipping the header row of the CSV

`bash cat wine_data.csv | py -s -f "float(x.split(',')[5]) > 3.0" `

Author:

Ron Reiter <ron.reiter@gmail.com>

Project details


Release history Release notifications

This version

1.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for pyclitool, version 1.0
Filename, size File type Python version Upload date Hashes
Filename, size pyclitool-1.0.macosx-10.13-intel.tar.gz (1.5 kB) File type Source Python version None Upload date Hashes View hashes
Filename, size pyclitool-1.0-py2.7.egg (1.9 kB) File type Egg Python version 2.7 Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page