Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ctrl+I, currently is there a way to trick spyder to inspect from ipyconsole when actually in editor? #9200

Closed
gepcel opened this issue Apr 25, 2019 · 2 comments

Comments

@gepcel
Copy link
Contributor

gepcel commented Apr 25, 2019

There are many issues about Ctrl+I working in ipython console but not in the editor. The more I use spyder the more I hate that I have to copy the line to ipython console to inspect the object and switch back to the editor to continue.

Is it possible to implement a patch or plugin for the short term until this issue is solved? For example maybe:

  • Instead of copying the line to ipython console, Ctrl+I to inspect it, then switching back to the editor to continue. Make this working automatically with a shortcut key. Or:
  • Another inspecting behavior to inspect an object in the editor, trick spyder to believe it's in the ipython console.

Or if it's not the dev team's interest, can someone point out a way how to implement this?

@gepcel gepcel changed the title Ctrl+I, currently is there a way to trick spyder to inspect from ipyconsole when in editor? Ctrl+I, currently is there a way to trick spyder to inspect from ipyconsole when actually in editor? Apr 25, 2019
@ccordoba12
Copy link
Member

This is basically a duplicate of issue #2162. And please don't insist, we're not going to add any short term solution for this.

@ccordoba12
Copy link
Member

ccordoba12 commented Apr 25, 2019

The only solution we're going to accept (as I told you before) is a PyLS plugin that creates a kernel in the background and gets completions from it.

Here you can find a PyLS plugin for MyPy:

https://github.com/tomv564/pyls-mypy

And you also need to learn about Abstract Syntax Trees in Python (i.e. its ast module) to detect definitions in your code, i.e. things like a = 10 and evaluate those assignments in the kernel.

If/once you have something working, we can take a look at it and include it in Spyder. Thanks for understanding.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants