Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #98247

Re: raw_input and break

From input/ldompeling@casema.nl
Newsgroups comp.lang.python
Subject Re: raw_input and break
References <mailman.30.1446674207.16136.python-list@python.org>
Message-ID <BMv_x.23349$_R5.7764@fx07.am1> (permalink)
Organization Pure Usenet - Usenet for everyone
Date 2015-11-04 22:37 +0000

Show all headers | View raw


In reply to "Joel Goldstick" who wrote the following:

> On Wed, Nov 4, 2015 at 4:44 PM, <input/ldompeling@casema.nl> wrote:
> 
> > I have an continues loop with "while True:"
> > Now I want to use "raw_input" and when I press "s" on the keybord that it
> > will
> > "break" the continues loop.
> > 
> > I tried:
> > choices = raw_input
> > if choises == s:
> > break
> > 
 You need to quote the s:
> if choices == 's'

I quote the s, but its still break even when I not press the s.

--------------------------------------------------------------

>But even when I not press "s" it "break"
> > I want that I not press "s" the script continues.
> > 
> > Any ideas ?
> > 
> 
> You need to quote the s:
> if choices == 's'
> 
> you need to check your spelling -- you have choices and choises
> 
> You need to indent break 4 spaces
> 
> > 
> > Thanks
> > 
> > 
> > 
> > --
> > --------------------------------- --- -- -
> > Posted with NewsLeecher v7.0 Beta 2
> > Web @ http://www.newsleecher.com/?usenet
> > ------------------- ----- ---- -- -
> > 
> > --
> > https://mail.python.org/mailman/listinfo/python-list
> > 
> 
> 
> 
> --
> Joel Goldstick
> http://joelgoldstick.com/stats/birthdays




-- 
--------------------------------- --- -- -
Posted with NewsLeecher v7.0 Beta 2
Web @ http://www.newsleecher.com/?usenet
------------------- ----- ---- -- -

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

raw_input and break input/ldompeling@casema.nl - 2015-11-04 21:44 +0000
  Re: raw_input and break Ian Kelly <ian.g.kelly@gmail.com> - 2015-11-04 14:54 -0700
  Re: raw_input and break Joel Goldstick <joel.goldstick@gmail.com> - 2015-11-04 16:56 -0500
    Re: raw_input and break input/ldompeling@casema.nl - 2015-11-04 22:37 +0000
      Re: raw_input and break Steven D'Aprano <steve@pearwood.info> - 2015-11-05 11:44 +1100
  Re: raw_input and break tian.su.yale@gmail.com - 2015-11-04 21:39 -0800
    Re: raw_input and break input/ldompeling@casema.nl - 2015-11-05 09:22 +0000
      Re: raw_input and break Peter Otten <__peter__@web.de> - 2015-11-05 11:01 +0100
        Re: raw_input and break input/ldompeling@casema.nl - 2015-11-05 10:40 +0000
          Re: raw_input and break Peter Otten <__peter__@web.de> - 2015-11-05 12:38 +0100
            Re: raw_input and break input/ldompeling@casema.nl - 2015-11-05 12:59 +0000
              Re: raw_input and break Peter Otten <__peter__@web.de> - 2015-11-05 15:16 +0100
                Re: raw_input and break input/ldompeling@casema.nl - 2015-11-05 14:34 +0000
                Re: raw_input and break Peter Otten <__peter__@web.de> - 2015-11-05 18:06 +0100
                Re: raw_input and break input/ldompeling@casema.nl - 2015-11-05 17:28 +0000
                Re: raw_input and break Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2015-11-05 20:09 -0500
                Re: raw_input and break input/ldompeling@casema.nl - 2015-11-06 05:08 +0000
                Re: raw_input and break input/ldompeling@casema.nl - 2015-11-06 11:50 +0000
                Re: raw_input and break Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2015-11-06 08:25 -0500

csiph-web