Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed4a.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.002 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'url:pypi': 0.03; 'nice!': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'scripting': 0.09; 'subject:using': 0.09; 'windows,': 0.09; 'python': 0.11; 'systems.': 0.12; 'windows': 0.15; 'prefered': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'scripts.': 0.16; 'wrappers': 0.16; 'subject:python': 0.16; 'thursday,': 0.16; 'language': 0.16; 'wrote:': 0.18; 'slightly': 0.19; 'platforms': 0.22; 'header:User-Agent:1': 0.23; 'stick': 0.24; 'header:X-Complaints-To:1': 0.27; 'header:In-Reply-To:1': 0.27; 'am,': 0.29; 'code': 0.31; 'really,': 0.31; 'quite': 0.32; 'linux': 0.33; 'url:python': 0.33; 'received:fr': 0.33; 'url:org': 0.36; 'to:addr:python-list': 0.38; 'short': 0.38; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'commands': 0.60; 'most': 0.60; 'tell': 0.60; 'new': 0.61; 'first': 0.61; 'charset:windows-1252': 0.65; 'received:109': 0.72; '10:43': 0.84; 'dsl': 0.84; 'gelonida': 0.84; 'notion': 0.91 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Gelonida N Subject: Re: CLI framework using python Date: Fri, 10 Oct 2014 13:58:11 +0200 References: <274771d2-4a11-40fe-bc31-ccfaa7d32690@googlegroups.com> <90907ef5-275d-4f24-bffb-bb97e7c3f051@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: 1-75-190-109.dsl.ovh.fr User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.1.2 In-Reply-To: <90907ef5-275d-4f24-bffb-bb97e7c3f051@googlegroups.com> X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list 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: 34 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1412942303 news.xs4all.nl 2831 [2001:888:2000:d::a6]:60935 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:78948 On 10/10/2014 10:43 AM, Rustom Mody wrote: > On Thursday, October 9, 2014 9:31:39 PM UTC+5:30, gelonida wrote: > >> For calling commands in a slightly nicer way than os.system / >> sybprocess.Popen you might look at sh or plumbum > >> https://pypi.python.org/pypi/sh > >> https://pypi.python.org/pypi/plumbum > > Both of these look quite nice! > [Im looking at them from a couple of angles > 1. Using python as a scripting language > 2. Notion of DSL > ] > > Can you tell me in short whats the difference?? > Not really, both are quite new to me as well. On a first glanced I prefered sh However: plumbum works also on Windows systems. As I have to write some code for Windows, some code for Linux and some code for both platforms I think plumbum might be nicer as I can stick to one syntax. So far I used both of them just in very tiny scripts. Most of my code still uses subprocess.Popen or my own clumsy wrappers around it.