def dict_to_txt_file(tdict, filename):
    """
    Method for writing a dict to a file with syntax similar to how files are input.
    
    Args:
        tdict (dict): Dictionary to be written to file.
        filename (string): Filename for file. 
    """
    with open(filename, 'w') as out_file:
        for key in tdict:
            out_file.write(str(key) + '=' + repr(tdict[key]).replace('\n',
                '').replace('\r', '') + '\n')
