Skip to content

marcwebbie/subp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Subp: Python subprocess optimized for your happiness.

This is a convenience wrapper around the subprocess module.

image

Usage

Run a command, get the response:

>>> r = subp.run('git config', data='data to pipe in', timeout=2)

>>> r.status_code
129
>>> r.std_out
'usage: git config [options]'
>>> r.std_err
''

Pipe stuff around too:

>>> r = subp.run('uptime | pbcopy')

>>> r.command
'pbcopy'
>>> r.status_code
0

>>> r.history
[<Response 'uptime'>]

Forked from: https://github.com/kennethreitz/envoy

About

Python subprocess optimized for your happiness

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published