Reputation: 521
I am using the Spyder which comes inside the Anaconda3 IDE. I found the Ipython Console here is very helpful in the sense that when I type in a function, the arguments and default values will come up automatically. When I used to use Jupyter notebook, there is no such functionality.
What I mean is like this:
When you just typed the function name and a left bracket, the Arguments
help window just pop up.
However, my problem is that, sometimes, in the middle of this function completion, in this example, I finished typing bottom=a, but I forgot what should be passed to width, so let's say I pressed Alt+Tab
in windows system to check it out in a PDF. Then I press Alt+Tab
to switch back to Ipython console, but now the Arguments
help window just dispeared.
My question is is there any shortcuts to make the it appear again? Typically, I just have to clear all my arguments, and go back to type the left bracket another time to make it appear to help me specify the arguments, but this is unkind.
Upvotes: 3
Views: 5531
Reputation: 2182
Press shift+tab
to get the argument window back.
Press ctrl+space
to get the function window which appears after a dot (e.g. after "plt.
").
Upvotes: 3
Reputation: 3716
Use the object inspector (renamed to the help window in later versions of Spyder). It gives the information you're looking for and much more!
In the main window, click on Tools -> Preferences -> Help -> Automatic connections -> check "IPython Console" and any others you'd like to use.
Go to the help tab which is defaulted to the top right of the main Spyder gui.
Click the gear on the top right of the help window and select "Rich Text"
Set the "Source" to "Console" on the upper left side of the "Help" tab.
In your IPython console, type plt.barh(
.
Note the lock button next to the gear. This will lock the help window to the function while you continue to write code.
Upvotes: 1