Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.mixmin.net!newsreader4.netcologne.de!news.netcologne.de!novso.com!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'from:addr:yahoo.co.uk': 0.04; 'patterns': 0.04; 'syntax': 0.04; 'output': 0.05; 'url:bitbucket': 0.05; 'linux,': 0.07; 'memory.': 0.07; 'subject:ANN': 0.07; 'tries': 0.07; 'variables': 0.07; 'arguments': 0.09; 'parsed': 0.09; 'subset': 0.09; 'windows,': 0.09; 'runs': 0.10; 'api': 0.11; 'python': 0.11; 'thread': 0.14; 'useful,': 0.14; 'windows': 0.15; '#21:': 0.16; 'bitbucket': 0.16; 'pipelines': 0.16; 'quoted': 0.16; 'reply-to:addr:yahoo.co.uk': 0.16; 'safely.': 0.16; 'simple.': 0.16; 'stderr': 0.16; 'subject: \n ': 0.16; 'subject:library': 0.16; 'syntax,': 0.16; 'threads.': 0.16; 'to:addr:python-announce-list': 0.16; 'travis': 0.16; 'wraps': 0.16; 'prevent': 0.16; '(not': 0.18; 'library': 0.18; 'module': 0.19; 'command': 0.22; '>>>': 0.22; 'import': 0.22; 'separate': 0.22; 'shell': 0.22; 'tests': 0.22; 'to:name:python- list@python.org': 0.22; 'install': 0.23; 'library,': 0.24; 'versions': 0.24; 'tracker': 0.26; 'to:2**1': 0.27; 'fixed': 0.29; 'skip:- 40': 0.29; 'external': 0.29; 'leave': 0.29; 'subject:) ': 0.29; 'compared': 0.30; 'gives': 0.31; 'easier': 0.31; 'lines': 0.31; 'that.': 0.31; 'pipe': 0.31; 'post.': 0.31; 'allows': 0.31; 'there.': 0.32; 'run': 0.32; 'up.': 0.33; 'mac': 0.33; 'style': 0.33; 'subject: (': 0.35; 'skip:s 30': 0.35; 'but': 0.35; 'version': 0.36; '2.6': 0.36; 'interact': 0.36; 'leads': 0.36; 'url:org': 0.36; 'example,': 0.37; 'skip:- 20': 0.37; 'project': 0.37; 'expected': 0.38; 'feedback': 0.38; 'problems': 0.38; 'desirable': 0.38; 'filled': 0.38; 'requiring': 0.38; 'rich': 0.38; 'to:addr:python-list': 0.38; 'issue': 0.38; 'skip:- 10': 0.38; 'ability': 0.39; 'does': 0.39; 'hosted': 0.39; 'quote': 0.39; 'reported': 0.39; 'to:addr:python.org': 0.39; 'enough': 0.39; 'read': 0.60; 'commands': 0.60; 'received:212.82': 0.60; 'hope': 0.61; 'entire': 0.61; 'information,': 0.61; 'simple': 0.61; 'such': 0.63; 'more': 0.64; 'header:Reply-To:1': 0.67; 'advantages': 0.68; '3.4': 0.84; 'alone.': 0.84; 'attacks.': 0.84; 'cygwin': 0.84; 'features:': 0.84; 'streams': 0.84; 'useful!': 0.84; 'capture': 0.91; 'pipeline': 0.91; 'numerous': 0.93 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.co.uk; s=s2048; t=1422113749; bh=xtLOZiYb0v0iRRo754XcGeX7o8eizvQ3Gg5aaoPScsc=; h=Date:From:Reply-To:To:Subject:From:Subject; b=OMES9yfo8DJ6Yhg11hnAL/d/sybrVupaBSHhMEuilh5EuBUbRFuSP4qgIQWgKINB11LoduhTKLK8hrLpgEDSLtxzyHS0+nM5Z0bWTsmsS2P+s6nsyc7+1jJYCrGRLgNuQevR55x/Negj/LaCBzXdUMdAaeI5QQI5ArhUOVO2kmWMKYqL/m1SqVlR2/gnzgs9ByQYVYGsgBspZWvju/MZFzZwkphgaYrvWIIQuF6er4/tXPAs6F3TJ019MAfhRXuDFKRYhlb1/wOuHuj0niBXAAX6ujfYJzTUwTVd9FDi//gvxkuJeNkRPpY3XGZg2195gd3mE/jielTuo+RaOVI8ng== X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 551821.9624.bm@omp1015.mail.ir2.yahoo.com X-YMail-OSG: IFmIymgVM1mZV.T66Gy5UkOPUZJF5x7lIE78gDoDlSjYxbkP1N.QX9TqEi7rpsc dj4Yi7.RsMGnSD4ZuGNngjozJVt1I5uWXr9IjC59ZtVWatU7BTBt3CeU.Q9XGicT5LBSWNdyfctU D87qzL.bPFC_GwbLQt6l8pKmPk_HSpz7iYY6mXcBiDfZwul3Q5xM4KJHCQmvInEqbxGx.WJcz_nI D_ReuOdfh_YwcbKhUiiHhCTkMPxXi_ZxpE0LpAh9BT4CAyuM3GRTDYlW68k9NHcXOMyl.yHubkZJ cOCTtUUClWwhdw1laEjXkVgo.ePchr.NJJzwoM1vSm_nx54P8MfthX9325PTok_IRLYa.wOT0QT5 ELyqmezDF0AFCBXFh6CTud7hXs_1xtZsa6ihg.LO49H0xnJOeBVTsGeP5HZ9MXJFRcjgIPDNOhwu V5RK_rnYXXGnpC3RAJ_s.yfBWJSv3Jlgpqe41HkwcaLsFlzDtGh2b7539K_4hqh8LJW.vePTZOGW lIaPF6oy5L5UCYpRPaz5LwJpOJZCbpvk6mgPJlAnRP0vSkT4JCelRD5IE41OhbumwnKnHsCWSFwq XFpOvNX85FyyjrXlaPwdh66ax_r.uFZg9Hnv8TW5e2n7zeqOHu5bITPHWQy.E1GAgK.0Rq88f_j2 W10ZLAb09ig-- Date: Sat, 24 Jan 2015 15:35:48 +0000 (UTC) From: Vinay Sajip To: "python-list@python.org" , "python-announce-list@python.org" Subject: ANN: Version 0.1.4 of sarge (a subprocess wrapper library) has been released. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Vinay Sajip List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 102 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1422113757 news.xs4all.nl 2940 [2001:888:2000:d::a6]:37021 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:84472 Version 0.1.4 of Sarge, a cross-platform library which wraps the subprocess module in the standard library, has been released. What changed? ------------- - Fixed issue #20: Now runs a pipeline in a separate thread if async. - Fixed issue #21: The command line isn't parsed if shell=True is specified. - Added Coveralls to Travis configuration. - Tests added to cover added functionality and reported issues. - Numerous documentation updates. What does Sarge do? ------------------- Sarge tries to make interfacing with external programs from your Python applications easier than just using subprocess alone. Sarge offers the following features: * A simple way to run command lines which allows a rich subset of Bash- style shell command syntax, but parsed and run by sarge so that you can run on Windows without cygwin (subject to having those commands available): >>> from sarge import capture_stdout >>> p = capture_stdout('echo foo | cat; echo bar') >>> for line in p.stdout: print(repr(line)) ... 'foo\n' 'bar\n' * The ability to format shell commands with placeholders, such that variables are quoted to prevent shell injection attacks. * The ability to capture output streams without requiring you to program your own threads. You just use a Capture object and then you can read from it as and when you want. * The ability to look for patterns in captured output and to interact accordingly with the child process. Advantages over subprocess --------------------------- Sarge offers the following benefits compared to using subprocess: * The API is very simple. * It's easier to use command pipelines - using subprocess out of the box often leads to deadlocks because pipe buffers get filled up. * It would be nice to use Bash-style pipe syntax on Windows, but Windows shells don't support some of the syntax which is useful, like &&, ||, |& and so on. Sarge gives you that functionality on Windows, without cygwin. * Sometimes, subprocess.Popen.communicate() is not flexible enough for one's needs - for example, when one needs to process output a line at a time without buffering the entire output in memory. * It's desirable to avoid shell injection problems by having the ability to quote command arguments safely. * subprocess allows you to let stderr be the same as stdout, but not the other way around - and sometimes, you need to do that. Python version and platform compatibility ----------------------------------------- Sarge is intended to be used on any Python version >= 2.6 and is tested on Python versions 2.6, 2.7, 3.1, 3.2, 3.3 and 3.4 on Linux, Windows, and Mac OS X (not all versions are tested on all platforms, but sarge is expected to work correctly on all these versions on all these platforms). Finding out more ---------------- You can read the documentation at http://sarge.readthedocs.org/ There's a lot more information, with examples, than I can put into this post. You can install Sarge using "pip install sarge" to try it out. The project is hosted on BitBucket at https://bitbucket.org/vinay.sajip/sarge/ And you can leave feedback on the issue tracker there. I hope you find Sarge useful! Regards, Vinay Sajip