Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #46470
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!xlned.com!feeder1.xlned.com!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <rosuav@gmail.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.009 |
| X-Spam-Evidence | '*H*': 0.98; '*S*': 0.00; 'assign': 0.07; '"if': 0.09; 'filename': 0.09; 'guys.': 0.09; '(which,': 0.16; 'fabio': 0.16; 'filename.': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'there?': 0.16; 'user?': 0.16; 'wrote:': 0.18; 'thu,': 0.19; 'typing': 0.19; 'input': 0.22; 'defined': 0.27; 'header:In-Reply-To:1': 0.27; 'function': 0.29; 'originally': 0.30; 'message-id:@mail.gmail.com': 0.30; 'context,': 0.31; 'file': 0.32; 'probably': 0.32; 'something': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'really': 0.36; 'thanks': 0.36; 'to:addr:python-list': 0.38; 'pm,': 0.38; 'to:addr:python.org': 0.39; 'name:': 0.61; '30,': 0.65; 'said:': 0.68; '2013': 0.98 |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=K2M1lk5hNWJRHn0Zyp7lhJQb0ngYAJmPbJo8MwdVC9k=; b=gkRq+Y5wXYeiKrsTM4TY6VcrZ6kFx+5nRjt32W/EKf3tEAkIgyJvwPak7ewCHnrVyS JZX5zq4lEbIwkmzwPn6j/TPHfcEhgkthBEsFlVB2wScnL4fbE84Tulq2tL/QItAy5aRU JiWVPL9Hk14kaCpS/2+/632zqnzn2K8TB58RgNA64ujkx55Acm+kwttc1s6h37r38HQI vkIo11xFNc0uuLiPoPwieCuGDNU1ZlsYtvJLBIhH9EfODa6N8fKgbKtpk84YJFJNS1vg JT3HXLx1OETyB+BsWEeHWZj3qS5k7XUjkdgPt9o7AGZMgZaNyg/4iItyOpWf1cEmeycI bhPQ== |
| MIME-Version | 1.0 |
| X-Received | by 10.52.117.16 with SMTP id ka16mr4346969vdb.43.1369916919254; Thu, 30 May 2013 05:28:39 -0700 (PDT) |
| In-Reply-To | <ccfe68ad-4dbf-4d4f-87ab-5b55d5ca0a26@googlegroups.com> |
| References | <e3fd9fdd-efa0-45b8-97b9-b77519012640@googlegroups.com> <ccfe68ad-4dbf-4d4f-87ab-5b55d5ca0a26@googlegroups.com> |
| Date | Thu, 30 May 2013 22:28:39 +1000 |
| Subject | Re: User Input |
| From | Chris Angelico <rosuav@gmail.com> |
| To | python-list@python.org |
| Content-Type | text/plain; charset=ISO-8859-1 |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.15 |
| Precedence | list |
| 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.2411.1369916922.3114.python-list@python.org> (permalink) |
| Lines | 14 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1369916922 news.xs4all.nl 16011 [2001:888:2000:d::a6]:47940 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:46470 |
Show key headers only | View raw
On Thu, May 30, 2013 at 10:19 PM, Eternaltheft <eternaltheft@gmail.com> wrote:
> Ok thanks guys. but when i use
>
> filename = input('file name: ')
> if not filename: #i get filename is not defined
> return(drawBoard) #possible to return function when no file input from user?
Do you really want to return there? What function is this defined in?
I think you probably want what Fabio originally said: that "if not
filename" (which, in this context, means "if the user hit Enter
without typing anything"), assign something to filename.
ChrisA
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll 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