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 | RSS feed

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.

Source Distribution

pyclitool-1.0.macosx-10.13-intel.tar.gz (1.5 kB view details)

Uploaded Source

Built Distribution

pyclitool-1.0-py2.7.egg (1.9 kB view details)

Uploaded Source

File details

Details for the file pyclitool-1.0.macosx-10.13-intel.tar.gz.

File metadata

  • Download URL: pyclitool-1.0.macosx-10.13-intel.tar.gz
  • Upload date:
  • Size: 1.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.1.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/2.7.10

File hashes

Hashes for pyclitool-1.0.macosx-10.13-intel.tar.gz
Algorithm Hash digest
SHA256 8b21082fbdb02d682392f2864f311f1bcd6041feaeab37949154875781f7643e
MD5 cb19c9349b6e2db0b7d39f2c15697cc9
BLAKE2b-256 835795c7e735ba1994885335768056f16123f20655636bca74a7abe3a8fec871

See more details on using hashes here.

File details

Details for the file pyclitool-1.0-py2.7.egg.

File metadata

  • Download URL: pyclitool-1.0-py2.7.egg
  • Upload date:
  • Size: 1.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.1.0 requests-toolbelt/0.8.0 tqdm/4.24.0 CPython/2.7.10

File hashes

Hashes for pyclitool-1.0-py2.7.egg
Algorithm Hash digest
SHA256 4bfbed4c704a2e4b659442ae2f4c83429b0e2068fd45d410e39214bf15143beb
MD5 6282465a29517eb6c5ad303f1874e728
BLAKE2b-256 54825b74dd43b0ea8110e7321ad127a8277fa739e9748e8051c1108fad73d630

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page