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

"Run block" and "Run File" are not working for external IPython kernels #1249

Closed
spyder-bot opened this issue Feb 17, 2015 · 18 comments
Closed

Comments

@spyder-bot
Copy link
Collaborator

From ccordoba12 on 2013-02-04T18:47:27Z

  1. We could use %run instead of runfile
  2. "Run block" would be a matter of just pasting the selected text on the right client

Original issue: http://code.google.com/p/spyderlib/issues/detail?id=1249

@spyder-bot
Copy link
Collaborator Author

From ccordoba12 on 2013-02-08T05:44:01Z

This issue was updated by revision 4adf2d0b5594 .

  • Now we send the block's code to the IPython or External focused console,
    depending only on which one is currently selected by the user.
  • This let us easily evaluate blocks on clients connected to external kernels.
  • This also eliminates the need to sync the selected IPython console with its
    respective Spyder kernel.

Status: Started

@spyder-bot
Copy link
Collaborator Author

From ccordoba12 on 2013-02-08T05:44:02Z

This issue was updated by revision 8490b44e0ad1 .

@spyder-bot
Copy link
Collaborator Author

From ccordoba12 on 2013-02-08T05:45:58Z

Jed, could you verify that both things are working with external kernels?

Cc: jed.lud...@gmail.com

@spyder-bot
Copy link
Collaborator Author

From jed.lud...@gmail.com on 2013-02-08T08:28:17Z

Looks like "run block" is working great.

"Run File" works but only if the path to the file of interest does not contain spaces. Probably just need to enclose the full path in quotes when you send it on to be executed. I can verify that this works when I manually enter the command.

@spyder-bot
Copy link
Collaborator Author

From ccordoba12 on 2013-02-08T10:02:13Z

This issue was updated by revision eec1372c42ae .

@spyder-bot
Copy link
Collaborator Author

From ccordoba12 on 2013-02-08T10:02:14Z

This issue was updated by revision 8852102d8829 .

@spyder-bot
Copy link
Collaborator Author

From ccordoba12 on 2013-02-08T10:04:24Z

Ok, thanks for the heads up. Please test if my last commits fix the issue.

@spyder-bot
Copy link
Collaborator Author

From jed.lud...@gmail.com on 2013-02-08T10:58:22Z

Actually, for some reason you have to use " " quotes instead of ' ' quotes. Then it should work. I would push a change but I'm a little swamped at the moment.

@spyder-bot
Copy link
Collaborator Author

From jed.lud...@gmail.com on 2013-02-08T13:23:55Z

This issue was updated by revision 6fa8fe5e3f1a .

Fixed the quote style and added the "-d" flag, so launching the debugger into
an external kernel is now possible!

Status: Fixed

@spyder-bot
Copy link
Collaborator Author

From sylvain....@gmail.com on 2013-02-08T15:21:39Z

Hi, just tested your latest version and it works perfectly. Thanks!

@spyder-bot
Copy link
Collaborator Author

From jed.lud...@gmail.com on 2013-02-08T15:46:47Z

You can thank Carlos. He did all the hard work!

@spyder-bot
Copy link
Collaborator Author

From ccordoba12 on 2013-02-08T17:29:50Z

I think by "your" he meant you and me :)

@spyder-bot
Copy link
Collaborator Author

From jed.lud...@gmail.com on 2013-02-08T17:45:02Z

Status: Verified

@spyder-bot
Copy link
Collaborator Author

From sylvain....@gmail.com on 2013-02-08T19:06:21Z

Hi, Exactly I was meaning you two. Thank you guys!

@spyder-bot
Copy link
Collaborator Author

From sylvain....@gmail.com on 2013-02-20T08:23:17Z

Hi Carlos, why not using the %run magic even for internal ipython kernels? Would it simplify the code?

@spyder-bot
Copy link
Collaborator Author

From jed.lud...@gmail.com on 2013-02-20T09:20:53Z

@-Sylvain, it would simplify the code, but breakpoints would no longer be transferred from Spyder into the debugging session. Recall that this is a limitation of debugging in an external kernel right now.

Spyder monkey patches pdb in such a way that breakpoints can be transferred into the debugging session directly. Using the special "runfile" command that we place into the kernel workspace loads the patched version of pdb so breakpoint transfer is preserved. The %run magic does not do this but instead uses IPython's internal version of pdb.

@spyder-bot
Copy link
Collaborator Author

From ccordoba12 on 2013-02-26T10:22:34Z

@-Sylvain: Here is another very good reason (an important missing functionality in %run) ipython/ipython#461 We could try to redefine the %run magic to be runfile if that's more intuitive. Would you like to give it a try?

@spyder-bot
Copy link
Collaborator Author

From sylvain....@gmail.com on 2013-02-26T13:03:10Z

Yes, I can give a try. I don't know the mechanism to overload magics yet but I can have a look. Cheers

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

No branches or pull requests

1 participant