def get_files(input_file):
file_index = {}<EOL>base_dir = None<EOL>if os.path.isfile(input_file):<EOL><INDENT>file_index[input_file] = None<EOL>base_dir = os.path.dirname(input_file)<EOL><DEDENT>elif os.path.isdir(input_file):<EOL><INDENT>base_dir = input_file<EOL>for inf in glob.glob(input_file + s.SBP_EXTENSION):<EOL><INDENT>file_index[os.path.abspath(inf)] = None<EOL><DEDENT>for inf in glob.glob(input_file + '<STR_LIT>'):<EOL><INDENT>base, index = get_files(os.path.abspath(inf))<EOL>z = file_index.copy()<EOL>z.update(index)<EOL>file_index = z<EOL><DEDENT><DEDENT>return (base_dir, file_index)<EOL>
Initializes an index of files to generate, returns the base
directory and index.