On 30 May 2013 12:42, "Eternaltheft" <eternalth...@gmail.com> 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

Are you using raw_input? It returns an empty string if the user enters
nothing, so you can just use an if.

filename = raw_input('file name: ')
if not filename:
    filename = 'your default'
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to