def encode_file():
    '''Executes decoding subsection.

    Shows the heading of this area.
    Gets the source file for encoding.
    Gets the destination file.
    Handles errors.
    Gets a key.
    Executes the main encoding system.
    Prints a confirmation.'''
    show_heading('ENCODE FILE')
    source = get_source('What is the name of the source file?')
    destination = get_destination('What will be the name of the destination file?')
    bad_key = True
    while bad_key:
        try:
            key = get_key()
            work_encode(source, destination, key)
            bad_key = False
        except:
            print 'Please enter a different filename.'
    print 'The encoded file has been created at the location specified.'
    print
Executes decoding subsection.

    Shows the heading of this area.
    Gets the source file for encoding.
    Gets the destination file.
    Handles errors.
    Gets a key.
    Executes the main encoding system.
    Prints a confirmation.
recipes/Python/456374_Crypt/recipe-456374.py