Path: csiph.com!feeder.erje.net!2.eu.feeder.erje.net!newsfeed0.kamp.net!newsfeed.kamp.net!fu-berlin.de!uni-berlin.de!not-for-mail From: "Sven R. Kunze" Newsgroups: comp.lang.python Subject: Re: argparse Date: Sat, 12 Mar 2016 13:21:26 +0100 Lines: 16 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Trace: news.uni-berlin.de jKIGq6ml3FWviC1zqQPvEweEF9JnilpnJUDLD2NxbLCg== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.008 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'url:pypi': 0.03; 'override': 0.07; ':-)': 0.12; '--help': 0.16; 'argparse': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'subject:argparse': 0.16; 'wrote:': 0.16; 'string': 0.17; 'basically': 0.18; 'arguments': 0.22; 'doc': 0.22; 'header:In-Reply-To:1': 0.24; 'function': 0.28; 'asked': 0.29; "can't": 0.32; 'options': 0.33; 'url:python': 0.33; 'message.': 0.33; 'received:10.0': 0.34; 'best,': 0.35; 'instead': 0.36; 'url:org': 0.36; 'to:addr:python- list': 0.36; 'subject:: ': 0.37; 'received:10': 0.37; 'being': 0.37; 'well.': 0.40; 'to:addr:python.org': 0.40; 'received:de': 0.40; 'hope': 0.61; 'charset:windows-1252': 0.62 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=mail.de; s=mail201212; t=1457785287; bh=ykBe58wR0Bg+UQYvK6SutWISBTgXSpUsze9Sa9o+GIA=; h=Subject:To:References:From:Date:In-Reply-To:From; b=ScLM12F1GDSUp2xWfGMMAAo4NnztGLlHCqxvJuOZcQ3Chde3Lx/7pL45RXw8ejKcL kDCQTlT0ZO6G7rSWfSEcs585lOYpcCYZ7S/srCRTZJ8PQWp8Gh9Ah2PwJfG2QCORre RncIyJpRri7/mwqDpJaLUOJ+YTzGyDs8y0NEX0AI= In-Reply-To: X-purgate: clean X-purgate: This mail is considered clean (visit http://www.eleven.de for further information) X-purgate-type: clean X-purgate-Ad: Categorized by eleven eXpurgate (R) http://www.eleven.de X-purgate: This mail is considered clean (visit http://www.eleven.de for further information) X-purgate: clean X-purgate-size: 487 X-purgate-ID: 154282::1457785287-000009F3-498EFB80/0/0 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Xref: csiph.com comp.lang.python:104696 On 12.03.2016 00:18, Fillmore wrote: > > Playing with ArgumentParser. I can't find a way to override the -h and > --help options so that it provides my custom help message. I remember everything being a lot easier using argh instead of argparse. https://pypi.python.org/pypi/argh#examples The doc string of a function basically is the help string which is true for arguments as well. I hope that helps even though you asked for argparse explicitly. :-) Best, Sven