Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Bringing objects from code into the Object inspector

Tags:

spyder

I am running Spyder 2.1.9, and I am liking it. I like how much information is provided by the Object inspector, but it only brings info on the various objects if I either type them into my program via the editor or directly into the Object inspector. Is there any way to highlight an object in your code and bring up the information in the Object inspector?

Also as a secondary question. The auto fill pop up when entering is nice (for instance if I am using the csv module and I type csv. into the editor it brings up all of the possible calls for that module), but doesn't work for Tkinter. Any idea as to why this may be?

like image 203
deadstump Avatar asked Jul 19 '12 19:07

deadstump


People also ask

How do you use code inspector?

Code Inspector can also be called from ABAP Workbench to perform a standard set of checks for the current object, for example by choosing Program → Check → Code Inspector in ABAP Editor.

Where do you define a set of code inspector checks that you want to perform?

The Code Inspector: Inspection screen is opened. In the Object Selection section, enter the name of the Object Set you have just created or choose F4 to search for the relevant one. In the Check Variant section, enter the name of the generated check variant or choose F4 to search for the relevant one.


1 Answers

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

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

For example, type the following into your Editor window:

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

Now click on the word math and press CTRL-I. Nothing happens. Click on the word sin and press CTRL-I. The Inspector will show up the documentation for sin().

Now try typing the same three lines into a Python console in Spyder, and repeat. You'll see that pressing CTRL-I after clicking math will work.

like image 181
HerrKaputt Avatar answered Oct 10 '22 02:10

HerrKaputt