def user_export_artist_tabular(request, username, artist, filetype):
    
    uh = UserHistory(username)
    uh.load_if_possible()
    
    data = [(("Week", {"bold":True}),("Plays", {"bold":True}))]
    try:
        for week, plays in uh.artists[artist].items():
            data.append((week, plays))
    except KeyError:
        raise Http404("No such artist.")
    
    try:
        return as_filetype(data, filetype, filename="%s_%s" % (username, artist))
    except __HOLE__:
        raise Http404("No such filetype")
dataset/ETHPy150Open andrewgodwin/lastgraph/lastgui/views.py/user_export_artist_tabular