def dirtree():
    path = os.path.expanduser('~')
return render_template('dirtree.html', tree=make_tree(path))
if __name__ == '__main__':
    app.run(host='localhost', port=8888, debug=True)
How to generate an html directory list using Python