Metadata-Version: 1.1
Name: simplerun
Version: 0.3.1
Summary: Make shell script running in a Pythonic way.
Home-page: https://github.com/netspyer/simplerun
Author: Yu Jian
Author-email: askingyj@gmail.com
License: UNKNOWN
Description: 
        ============
           About
        ============
        
        Running shell in a Pythonic way.
        
        ============
        Installation
        ============
        
        .. code-block :: bash
        
            $ pip install simplerun
        
        ============
           Usage
        ============
        
        Basic
        =====
        
        .. code-block :: python
        
            >> from simplerun import run
            >> r = run('ls -l')
            >> r
            <[0] `ls -l`>
        
        `0` refers to the exit code here.
        
        .. code-block :: python
        
            >> print r.std_out
            total 8
            -rw-r--r-- 1 yj staff 664 11 19 21:46 README.md
            -rw-r--r-- 1 yj staff 829 11 18 22:39 setup.py
            drwxr-xr-x 6 yj staff 204 11 19 21:46 simplerun
        
        
        Iterable as input data
        ======================
        
        .. code-block :: python
        
            >> with open('setup.py') as data:
            >>     r = run('grep def', data)
            >> print(r.std_out)
        
        `Result` object as input data
        =============================
        
        .. code-block :: python
        
            >> r_data = run('ps aux')
            >> r = run('grep Chrome', r_data)
        
        Use as a debugger
        =================
        
        .. code-block :: python
        
            >> r = run('ps aux | stranger | grep keyword')
            >> r
            <[-1] `stranger`>
            >> r.exc
            OSError(2, 'No such file or directory')
        
        Found the `stanger` is the evil
        
        .. code-block :: python
        
            >> r.history
            [<[0] `ps aux`>]
        
        review history, and keep going with good input:
        
        .. code-block :: python
        
            >> r.rest
            [['grep', 'keyword']]
            >>
            >> r2 = run(r.rest, '''Good line that contains the keyword,
                                   but not this line, sorry.''')
            >> print(r2.std_out)
            'Good line that contains the keyword
        '
        
Platform: UNKNOWN
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Natural Language :: English
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: MacOS
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 2.6
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3.3
