Python at the Prompt

Pyp (short for Pyed Piper) is a project to enable python text processing at the unix prompt. I suck at sed and AWK but I suck less at Python so I think this looks interesting. I wish there was a Windows equivalent to work with CMD commands. If anything could use some help, it’s the Windows CMD interface.

The module supports standard Python string processing but also includes some built in variables for accessing strings from the shell.

The “p” variable processes each line of the shell output while “pp” processes the entire block as one string. There are several interesting examples available through the module home.

Here’s what I did to install the command on my Mac:

    <li>Download the file and place it in the /usr/local/bin directory.</li>
    
    <li>Set the permissions to include execute (755 should work)</li>
    
    <li>Have fun</li>
    

I learned something else interesting while reading about this module. Sony’s Imageworks has several really amazing open source projects. They were all developed to address internal needs and eventually released to the public.