write toolbar.py