"Object Inspector" and "Online Help" feature request?

235 views
Skip to first unread message

vbgunz

unread,
Mar 26, 2012, 4:23:34 PM3/26/12
to spyd...@googlegroups.com
I found Spyder today and am super excited about it for 2 reasons. The first is "object inspector". The second is "online help". It's awesome to add the fun back to programming with unknown or little known code. After using Spyder for a bit and feeling great about it, I noticed there are some things I wish Spyder could do quicker. This isn't perhaps the best place to ask for features but I appreciate your time.

For one, the "object inspector" I hope provides enough ground work to add a feature. Currently there is "Source: Console" and "Source: Editor". Is it possible to add a "Source: Cursor" and how it works is, it follows the cursor and is able to immediately, without any interaction, etc, provide a helpful overview on objects currently selected, highlighted or in which the cursor is over/before, (bonus would be if it could update while in auto-completion and not wait for an opening parenthesis)? In other words, it would be amazing to get immediate inline help as you code and-use-the consoles without having to interact in anyway with the "object inspector".

Second, I wish the "object inspector" had more links to "online help". A good example, is "object inspector" knows I am using the os package. When I call os.path.abspath, I get immediate help on the member *but* what I am usually after is another member of *os.path*. It would be super awesome at this point to simply have a link to os.path and os from the "object inspector". What an excellent way to re/familiarize oneself with well documented but unknown or foggy code.

I believe learning is an absolute and critical personal attribute to writing better code. I just wish the learning part didn't take me out of the fun or heat-of-the-moment coding. Spyder is very promising with this and I love it for that very reason alone. I just hope it get's better, more automatic, in sight but out of the way so I can code right the very time every time. Damn, I hope someone is listening.

Thanks

Jonatan Hjul

unread,
Mar 27, 2012, 7:10:53 AM3/27/12
to spyder
You can use the issue tracker here:http://code.google.com/p/spyderlib/
issues/list

Normally I am only using the object inspector and not the online help,
as both typically stems from the same source - and if you want to find
something more general Google is you friend, as documentation is
almost always available online.

Anyway, I am sure that you are welcome to implement cursor awareness
for the object inspector, otherwise you just have to hope that there
are others who also think that would be an awesome feature.

/Jonatan

vbgunz

unread,
Mar 27, 2012, 9:45:16 AM3/27/12
to spyd...@googlegroups.com

Carlos Córdoba

unread,
Mar 27, 2012, 12:54:34 PM3/27/12
to spyd...@googlegroups.com
Hi,

I'm really happy you liked the object inspector because it represents my
main contribution to the project. My comments to your suggestions are below.

El 26/03/12 15:23, vbgunz escribió:


> I found Spyder today and am super excited about it for 2 reasons. The
> first is "object inspector". The second is "online help". It's awesome
> to add the fun back to programming with unknown or little known code.
> After using Spyder for a bit and feeling great about it, I noticed
> there are some things I wish Spyder could do quicker. This isn't
> perhaps the best place to ask for features but I appreciate your time.
>
> For one, the "object inspector" I hope provides enough ground work to
> add a feature. Currently there is "Source: Console" and "Source:
> Editor". Is it possible to add a "Source: Cursor" and how it works is,
> it follows the cursor and is able to immediately, without any
> interaction, etc, provide a helpful overview on objects currently
> selected, highlighted or in which the cursor is over/before, (bonus
> would be if it could update while in auto-completion and not wait for
> an opening parenthesis)? In other words, it would be amazing to get
> immediate inline help as you code and-use-the consoles without having
> to interact in anyway with the "object inspector".

We have the keyboard shortcut CTRL + I that let let you send any object
on the editor or the console to the object inspector. Unfortunately it's
not well known but it works like this: if you write 'range' (for
example) and hit CTRL + I you will immediately get its docstring on the
object inspector. This also works if you put the cursor at the end of
the any object you want to inspect. If you have any doubts about how it
works, please let me know.

> Second, I wish the "object inspector" had more links to "online help".
> A good example, is "object inspector" knows I am using the os package.
> When I call os.path.abspath, I get immediate help on the member *but*
> what I am usually after is another member of *os.path*. It would be
> super awesome at this point to simply have a link to os.path and os
> from the "object inspector". What an excellent way to re/familiarize
> oneself with well documented but unknown or foggy code.

I know exactly what you mean and there is definitely room for
improvement here. The idea is to show online help for standard lib
objects because their docstrings are not that good. I have some ideas on
how to do it, it's not going to be easy but I maybe I could have it
ready for 2.2.

> I believe learning is an absolute and critical personal attribute to
> writing better code. I just wish the learning part didn't take me out
> of the fun or heat-of-the-moment coding. Spyder is very promising with
> this and I love it for that very reason alone. I just hope it get's
> better, more automatic, in sight but out of the way so I can code
> right the very time every time. Damn, I hope someone is listening.

I totally agree with you and that's why I'm improving the object
inspector the best that I can. I have lots of ideas that I plan to
implement on the next two or three releases.

Cheers,
Carlos

> Thanks
>
> --
> You received this message because you are subscribed to the Google
> Groups "spyder" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/spyderlib/-/khR3Ipetj9kJ.
> To post to this group, send email to spyd...@googlegroups.com.
> To unsubscribe from this group, send email to
> spyderlib+...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/spyderlib?hl=en.

vbgunz

unread,
Mar 28, 2012, 7:20:59 PM3/28/12
to spyd...@googlegroups.com
 
Hi Carlos,

I thank you very much for your contributions. Both the "Object Inspector" and "Online help" address critical concern regarding any IDE, the fact that no one is perfect and an immediate help facility is always crucial. Thank you again.

The Ctrl + I shortcut works very well. There is still that wish for less interaction, more automatic behaviour. It would be extra nice to get this within the argument signature of a callable or from outside of the closing parenthesis. Another thing realized is, why are only callables inspected? Wouldn't it be good to know os.sep, os.name, re.LOCALE, and the kabillion other static values?

Carlos, you're on the right track and I sincerely appreciate your time and I would really like to know more about your plans for OI.

Thank you Carlos

> spyderlib+unsubscribe@googlegroups.com.

Carlos Córdoba

unread,
Mar 29, 2012, 10:34:52 AM3/29/12
to spyd...@googlegroups.com


El 28/03/12 18:20, vbgunz escribió:
 
Hi Carlos,

I thank you very much for your contributions. Both the "Object Inspector" and "Online help" address critical concern regarding any IDE, the fact that no one is perfect and an immediate help facility is always crucial. Thank you again.

The Ctrl + I shortcut works very well. There is still that wish for less interaction, more automatic behaviour. It would be extra nice to get this within the argument signature of a callable or from outside of the closing parenthesis. Another thing realized is, why are only callables inspected? Wouldn't it be good to know os.sep, os.name, re.LOCALE, and the kabillion other static values?

It would be much harder to try to trigger the object inspector from anywhere in its definition body. That will probably require some AST magic to parse the code and get the function or method name. Not so easy to do but it is an interesting idea worth of exploring.

We only inspect objects that a docstring attached to them. Those are not only callables but module files too. As far as I know, constants or static values can't have docstrings and that's why we can't get more info about them. Sorry about that.


Carlos, you're on the right track and I sincerely appreciate your time and I would really like to know more about your plans for OI.

My plans more or less are:

1. Improve docstring rendering with the possibility to see matplotlib plots directly in the OI.
2. Add a button attached to every doctest so that the user can copy its contents and paste them directly in the editor or the console.
3. Add links to the python standard library docs.
4. Add further info to the docstrings on a per module basis, like links to tutorials, cookbooks, video tutorials and any additional info we can point to useful and free resources out there.
5. Add the possibility to search for particular terms inside the docstrings text, so the user can find the modules or functions he needs to use, without knowing before hand that he needs to import a particular thing to do what he wants.
6. Create an interface based on jquery mobile so the OI looks equally well if used at the whole wide of the screen or half of it (like it is now).

1 and 2 will surely be in 2.2, and maybe 3 if time permits. I'll try to add the others to 2.3, depending on how hard to implement them is :-).

Cheers,
Carlos

To view this discussion on the web visit https://groups.google.com/d/msg/spyderlib/-/tHkSLSPZU_gJ.

To post to this group, send email to spyd...@googlegroups.com.
To unsubscribe from this group, send email to spyderlib+...@googlegroups.com.

vbgunz

unread,
Apr 3, 2012, 6:41:53 AM4/3/12
to spyd...@googlegroups.com
Hi Carlos,

Items 1, 3, 4 and 5 on your todo are the most exciting. Item 2 needs a test button. I am not too sure at all about item 6. All in all, you seem to be on a good track and I have faith you know much better than I. I am grateful for your help and time Carlos. Good luck and thank you again!
Reply all
Reply to author
Forward
0 new messages