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


Groups > comp.lang.python > #46463

Re: User Input

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!xlned.com!feeder7.xlned.com!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <python@mrabarnett.plus.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.127
X-Spam-Level *
X-Spam-Evidence '*H*': 0.75; '*S*': 0.00; 'input,': 0.09; 'python': 0.11; "(it's": 0.16; 'from:addr:mrabarnett.plus.com': 0.16; 'from:addr:python': 0.16; 'from:name:mrab': 0.16; 'message- id:@mrabarnett.plus.com': 0.16; 'received:84.93': 0.16; 'received:84.93.230': 0.16; 'thursday,': 0.16; 'wrote:': 0.18; 'input': 0.22; 'header:User-Agent:1': 0.23; 'equivalent': 0.26; 'skip:" 20': 0.27; 'header:In-Reply-To:1': 0.27; 'function': 0.29; 'returned': 0.30; "i'm": 0.30; 'file': 0.32; 'raw': 0.33; 'trouble': 0.34; 'received:84': 0.35; 'but': 0.35; 'thanks': 0.36; 'hi,': 0.36; 'example,': 0.37; 'conditions.': 0.38; 'to:addr :python-list': 0.38; 'does': 0.39; 'to:addr:python.org': 0.39; 'called': 0.40; 'how': 0.40; 'dangerous': 0.60; 'name': 0.63; 'such': 0.63; '30,': 0.65; 'header:Reply-To:1': 0.67; 'prompt': 0.68; 'default': 0.69; 'user,': 0.69; 'reply-to:no real name:2**0': 0.71; 'evaluate': 0.72; 'reply!': 0.84; 'reply- to:addr:python.org': 0.84; '2013': 0.98
X-CM-Score 0.00
X-CNFS-Analysis v=2.1 cv=cIzZ7DuN c=1 sm=1 tr=0 a=0nF1XD0wxitMEM03M9B4ZQ==:117 a=0nF1XD0wxitMEM03M9B4ZQ==:17 a=0Bzu9jTXAAAA:8 a=oyR3mlnJdzkA:10 a=ihvODaAuJD4A:10 a=OUOv7kDek9cA:10 a=8nJEP1OIZ-IA:10 a=EBOSESyhAAAA:8 a=8AHkEIZyAAAA:8 a=uwWCaHZccQcA:10 a=Jj9_GbMTWsmQo-J7IvgA:9 a=wPNLvfGTeEIA:10
X-AUTH mrabarnett:2500
Date Thu, 30 May 2013 13:08:25 +0100
From MRAB <python@mrabarnett.plus.com>
User-Agent Mozilla/5.0 (Windows NT 5.1; rv:17.0) Gecko/20130509 Thunderbird/17.0.6
MIME-Version 1.0
To python-list@python.org
Subject Re: User Input
References <e3fd9fdd-efa0-45b8-97b9-b77519012640@googlegroups.com> <7f9b7a2e-3142-468b-a2ce-9434c1ad7989@googlegroups.com>
In-Reply-To <7f9b7a2e-3142-468b-a2ce-9434c1ad7989@googlegroups.com>
Content-Type text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding 7bit
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
Reply-To python-list@python.org
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.2408.1369915693.3114.python-list@python.org> (permalink)
Lines 14
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1369915693 news.xs4all.nl 15974 [2001:888:2000:d::a6]:34819
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:46463

Show key headers only | View raw


On 30/05/2013 12:48, Eternaltheft wrote:
> On Thursday, May 30, 2013 7:33:41 PM UTC+8, Eternaltheft wrote:
>> Hi, I'm having trouble oh how prompt the user to enter a file name
>> and how to set up conditions. For example, if there's no file name
>> input by the user, a default is returned
>
> Thanks for such a fast reply! and no im not using raw input, im just
> using input. does raw_input work on python 3?
>
In Python 2 it's called "raw_input" and in Python 3 it's called "input".

Python 2 does have a function called "input", but it's not recommended
(it's dangerous because it's equivalent to "eval(raw_input())", which
will evaluate _whatever_ is entered).

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


Thread

User Input Eternaltheft <eternaltheft@gmail.com> - 2013-05-30 04:33 -0700
  Re: User Input Fábio Santos <fabiosantosart@gmail.com> - 2013-05-30 12:45 +0100
  Re: User Input Eternaltheft <eternaltheft@gmail.com> - 2013-05-30 04:48 -0700
    Re: User Input Chris Angelico <rosuav@gmail.com> - 2013-05-30 22:06 +1000
    Re: User Input MRAB <python@mrabarnett.plus.com> - 2013-05-30 13:08 +0100
    Re: User Input Fábio Santos <fabiosantosart@gmail.com> - 2013-05-30 13:10 +0100
  Re: User Input Eternaltheft <eternaltheft@gmail.com> - 2013-05-30 05:19 -0700
    Re: User Input Fábio Santos <fabiosantosart@gmail.com> - 2013-05-30 13:27 +0100
    Re: User Input Chris Angelico <rosuav@gmail.com> - 2013-05-30 22:28 +1000
  Re: User Input Eternaltheft <eternaltheft@gmail.com> - 2013-05-30 05:37 -0700
    Re: User Input Dave Angel <davea@davea.name> - 2013-05-30 08:58 -0400
    Re: User Input Chris Angelico <rosuav@gmail.com> - 2013-05-30 22:59 +1000
  Re: User Input Eternaltheft <eternaltheft@gmail.com> - 2013-05-30 06:10 -0700
    Re: User Input Dave Angel <davea@davea.name> - 2013-05-30 09:37 -0400
      Re: User Input Eternaltheft <eternaltheft@gmail.com> - 2013-05-30 07:03 -0700
        Re: User Input Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-05-30 15:30 +0100
          Re: User Input Eternaltheft <eternaltheft@gmail.com> - 2013-05-30 07:49 -0700
      Re: User Input Eternaltheft <eternaltheft@gmail.com> - 2013-05-30 07:47 -0700
        Re: User Input Joshua Landau <joshua.landau.ws@gmail.com> - 2013-05-30 16:09 +0100

csiph-web