def get_source(prompt):
    '''Gets a source file.

    Gets the file.
    Handles errors.
    Returns the file.'''
    while True:
        try:
            source = file(raw_input(prompt + ' '), 'rb')
            return source
        except:
            pass
        print 'Please enter a different filename.'
Gets a source file.

    Gets the file.
    Handles errors.
    Returns the file.
recipes/Python/456374_Crypt/recipe-456374.py