Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!eweka.nl!lightspeed.eweka.nl!194.134.4.91.MISMATCH!news2.euro.net!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.001 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'python,': 0.02; 'subject:Python': 0.05; 'newbie': 0.05; 'python': 0.09; 'command- line': 0.09; 'subject:command': 0.09; 'cc:addr:python-list': 0.10; 'library': 0.15; '-tkc': 0.16; 'bonus.': 0.16; 'from:addr:python.list': 0.16; 'from:addr:tim.thechases.com': 0.16; 'from:name:tim chase': 0.16; 'message- id:@tim.thechases.com': 0.16; 'received:70.251': 0.16; 'received:dsl.rcsntx.swbell.net': 0.16; 'received:rcsntx.swbell.net': 0.16; 'received:swbell.net': 0.16; '(in': 0.18; 'input': 0.18; 'windows': 0.19; 'app': 0.19; 'cc:2**0': 0.23; "i've": 0.23; 'cc:no real name:2**0': 0.24; 'command': 0.24; 'cc:addr:python.org': 0.25; 'header:In-Reply- To:1': 0.25; 'header:User-Agent:1': 0.26; 'wondering': 0.26; '[1]': 0.27; 'run': 0.28; 'post': 0.28; 'readline': 0.29; "i'm": 0.29; 'url:python': 0.32; 'suggestion': 0.32; 'docs': 0.33; 'needed': 0.35; 'subject:?': 0.35; 'url:org': 0.36; 'url:library': 0.36; "didn't": 0.36; 'should': 0.36; 'possible': 0.37; 'does': 0.37; 'subject:: ': 0.38; 'supports': 0.38; 'url:docs': 0.38; 'subject:-': 0.40; 'most': 0.61; "you've": 0.61; 'further': 0.61; 'replying': 0.64; 'past.': 0.65; 'sounds': 0.71; 'interesting,': 0.84; 'received:50.22': 0.84 Date: Thu, 03 Jan 2013 08:24:20 -0600 From: Tim Chase User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: "bob.blanchett" Subject: Re: Creating interactive command-line Python app? References: <1135168477.969110.290850@f14g2000cwb.googlegroups.com> <198fde16-eb65-4425-9a81-147cdbd7fb07@googlegroups.com> In-Reply-To: <198fde16-eb65-4425-9a81-147cdbd7fb07@googlegroups.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - boston.accountservergroup.com X-AntiAbuse: Original Domain - python.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tim.thechases.com Cc: python-list@python.org 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: 19 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1357222992 news.xs4all.nl 6959 [2001:888:2000:d::a6]:34450 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:36062 (original post from planetthoughtful didn't seem to arrive here, so replying to Bob's reply) > Newbie to Python, and I'm wondering if it's possible to create a > Python console app that prompts for further input on the command > line when run (in Windows XP, if that's important)? While Bob's suggestion of "cliff" sounds interesting, Python also offers the "cmd" module[1] in the standard library which does most of what I've needed in the past. If you've got the readline library available, it also supports autocompletion and command-line history which is a nice bonus. -tkc [1] http://docs.python.org/2/library/cmd.html # py2.x http://docs.python.org/3/library/cmd.html # py3.x Docs should be about the same