User Input
Chris Angelico
rosuav at gmail.com
Thu May 30 08:28:39 EDT 2013
On Thu, May 30, 2013 at 10:19 PM, Eternaltheft <eternaltheft at 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
More information about the Python-list
mailing list