This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description
pit-- Python as a stream filter
=======================================

What's new in version 0.3
~~~~~~~~~~~~~
* Autoimport support with [autoimp](github.com/autoimp) Dependency frozen at 1.0.4 for now.
* Runs on Python 3
* Version flag

What's new in version 0.2
~~~~~~~~~~~~~

* NOTE: expression evaluation is now default; -e now stands for _execute_
* -b flag can be used to execute code before loop
* optional positonal statement after loop

What's new in version 0.1.1
~~~~~~~~~~~~~
* Lines of standard input can be split up by a field separator.
* -e flag evaluates command as an expression.

Pit is a tool for making it easier to run Python on the command line.
It is designed to be a swiss army knife for people who aren't as familiar with
(or who don't want to deal with) the entire array of Unix utilities.

Example uses:
-------------

Quick calculator
~~~~~~~~~~~~~~~
::
pit "math.log(.97**12)"


String processing
~~~~~~~~~~~~~~~
Lines of standard input are piped into the underscore variable, _
::
cat document.txt | pit "_[::-1]" #Reverses all lines

Filter lines
~~~~~~~~~~~~~~
::
cat document.txt | pit -f 'len(_) > 10' # Filter for long lines
cat document.txt | pit -f 'random.random() > 0.5' # Sample lines from document with probability 0.5

Count unique occurences of lines in a document:
~~~~~~~~~~~~~~
The -e flag causes pit to execute the code, rather than evaluate it.
The -b flag (--begin) allows initialization code to be set up.
An optional positional argument after the main code section is run after the input ends.
::
cat redundant.txt | pit -b 'a=set()' 'a.add(_)' 'print(len(a))'

Convert entire document to base64:
~~~~~~~~~~~~~~
The -p flag reads until EOF into the underscore variable.
::
>cat document.txt | pit -p 'base64.encodestring(_)'
Release History

Release History

0.3.0

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.2.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting