The gedit Python outline plugin provides a Python code outline side pane.