def main(dir_paths):
    """Main function called when running as a command-line script.

    Progress and errors are printed to stdout and stderr, respectively.

    """
    try:
        for file_path in clean_headers(dir_paths):
            print file_path
    except FixMailHeadersError, error:
        print >>stderr, error
        exit(-1)
Main function called when running as a command-line script.

    Progress and errors are printed to stdout and stderr, respectively.

    
recipes/Python/576471_Fix_invalid_mail_headers_when_moving/recipe-576471.py