Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!feeder.news-service.com!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!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.08; 'naturally': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:80.91.229.12': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'received:lo.gmane.org': 0.09; 'am,': 0.12; 'library': 0.15; 'doe': 0.16; 'komodo': 0.16; 'msvcrt': 0.16; 'subject:continuing': 0.16; 'question.': 0.16; 'wrote:': 0.16; '(like': 0.21; "doesn't": 0.22; 'header:In-Reply-To:1': 0.22; 'work,': 0.23; 'there.': 0.24; 'code': 0.25; 'fine': 0.26; 'windows': 0.26; 'up.': 0.26; 'import': 0.28; 'print': 0.29; 'script': 0.29; 'subject:?': 0.31; 'to:addr:python-list': 0.33; 'header:User-Agent:1': 0.34; 'file.': 0.34; 'test': 0.34; 'header:X-Complaints-To:1': 0.35; 'post': 0.36; 'question': 0.36; 'keyboard': 0.37; 'using': 0.37; 'could': 0.38; 'received:org': 0.38; 'steven': 0.38; 'subject:: ': 0.39; 'window': 0.39; 'header :Mime-Version:1': 0.39; 'else': 0.39; 'to:addr:python.org': 0.39; 'might': 0.40; 'your': 0.61; 'john': 0.62 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Gelonida N Subject: Re: Wait for a keypress before continuing? Date: Mon, 08 Aug 2011 09:41:05 +0200 References: <4e3f2827$0$5826$c3e8da3$12bcf670@news.astraweb.com> <4e3f2d90$0$29980$c3e8da3$5496439d@news.astraweb.com> <4e3f4d99$0$1070$c3e8da3$9f400e27@news.astraweb.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: unicorn.dungeon.de User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.18) Gecko/20110617 Lightning/1.0b2 "" In-Reply-To: <4e3f4d99$0$1070$c3e8da3$9f400e27@news.astraweb.com> X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 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: 31 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1312789282 news.xs4all.nl 23898 [2001:888:2000:d::a6]:38522 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:11030 On 08/08/2011 04:44 AM, John Doe wrote: > Steven D'Aprano wrote: > >> Also, are you using an IDE? If so, it could very well be >> interfering with the keyboard buffer > > I really don't know how to answer your question. I am using > Windows XP SP3. Komodo Edit 6 for editing the *.py file. Dragon > Naturally Speaking, Natlink, and Dragonfly might all be part of > the process. > > Must be my system. I will post the solution if it comes up. Main question is whether your script is exectued in a console window (like cmd.exe) or from within a graphical library without console. you yould try to start cmd.exe and call your python script directly from there. if this doesn't work, then try just a simple test script containing nothing else than the code to wait for a keypress. Simple test script (working fine for me) import msvcrt print "before" msvcrt.getch() print "after"