def METHOD_NAME(filename="~/.history"):
    expanded = os.path.expanduser(filename)
    with open(expanded, 'w') as f:
        for line in _reader.history.historyList:
            f.write(line)
            f.write("\n")