I see it referenced, but never explained what it is.
https://docs.spyder-ide.org/editor.html
Googled without success.
https://docs.spyder-ide.org/editor.html "Providing a description to the right of the separator will give that cell its own name in the Outline Explorer." Sounds like something for Navigating cells? Where do I find it? Are there shortcuts for navigating cells you create?
Thanks!
in your code you can use this , for examle in spyder before each function ( above line of each function ) write #%% you will see the difference in gui where you will find that block is within a cell/ or it is outlined.
and in outlined winodw ( enable views>panes>outlines) you will see the each block and outlier in code
I think the Outline Explorer is made to facilitate navigation inside a long and/or dense Python script. In one look you can see the structure of your script, and you can go directly to whatever was outlined by clicking on it.
From what I've seen until now, outlined elements that will appear in the Outline Explorer are :
- the name of the script selected in the Editor [Python logo]
- functions [yellow
f
logo] - classes [blue
C
logo] - inside classes :
__init__
[pink_
logo], methods [greenM
logo] - inside functions and class methods : loops (for, while...), conditions (if-elif-else, try-except...)
- cells (see prashant rana's answer)
if __name__ == '__main__' :
(allows that "when your script is run by passing it as a command to the Python interpreter, all of the code that is at indentation level 0 gets executed" )- comments [grey
#
logo] (see below)
To make comment markers appear : write #### YourComment
. The space between the four hashes and the text is important ; the code works with four hashes or more.
"YourComment" will appear in your Outline Explorer. If it's in a cell , it will remain in the same cell. I use comment markers for sub-titles, and sometimes to mark where I have to re-work some code.
来源:https://stackoverflow.com/questions/54925458/what-is-outline-explorer-in-spyder