Bringing objects from code to the Object Inspector

I am running Spyder 2.1.9 and I like it. I like how much information is provided by the object inspector, but it only brings information about the various objects if I either enter them into my program through the editor or directly into the Object inspector. Is there a way to highlight an object in your code and display the information in the Object Inspector?

Just like a secondary question. Autocomplete upon input is pleasant (for example, if I use the csv module and I type csv. editor, it calls all possible calls for this module), but it does not work for Tkinter. Any idea why this could be?

+6
source share
1 answer

The answer to your first question is negative, unfortunately. See the official bug report in the Spyder group.

You can use CTRL+I on the console to call the Inspector from any object, and you can also use it in functions (but not arbitrary objects / variables) from the editor. This is a known inconsistency.

For example, enter the following in the editor window:

 import math x = 3.14159 y = math.sin(x) 

Now press the word math and press CTRL-I. Nothing happened. Click on the word sin and press CTRL-I. The inspector will display the documentation for sin() .

Now try typing the same three lines into the Python console in Spyder and try again. You will see that pressing CTRL-I after pressing math will work.

+6
source

Source: https://habr.com/ru/post/920915/


All Articles