How to display a ipython iframe in spyder python? - spyder

I have some code to generate anIpython Iframe , it works in Jupyter, but not in Spyder. How to show the IFrame in Spyder or pop up html ?
In Spyder python, I wrote in the IPython interpreter :
from pivottablejs import pivot_ui
pivot_ui(df)
<IPython.lib.display.IFrame at 0x12a9b8d0>

To active pop in Spyder, we need to go to Preference / Graphics and enable Qt.
So all Ipython interactive will be into pop up QT.

Related

Spyder - show call stack in variable explorer

I know this question has been asked previously, but the questions I have found were asked several years ago and so I suspect Spyder has undergone updates in this period.
Is it possible yet to view the call-stack for recursive programs in Spyder (for python) as it is in VS Code, for example?
If so, please can someone guide me as to how this is done
Thank you
Yes you can do it thanks to python debugger (pbd) inside Spyder. At least this works from Spyder 2.7 but maybe earlier. In Spyder (checked for Spyder 2.7; and Spyder 3.3.3. with Python 3.6.8., 64bits, PyQt5 5.12, Windows 7) you can use ipbd in debugging mode in the ipython console. There are 3 commands to navigate in the stack:
w(here): it returns the call stack on iPython console with all levels
u(p): it goes one level up in the stack debugging, and updates the variables explorer, so you see now only the variables that apply to that stack level. It also updates the arrow debug pointer in the script editor.
d(own): the same than "up" but down

Stop Spyder opening last used scripts

If you close Spyder while scripts are open in the Editor pane, these same scripts will be loaded next time Spyder is started. Is there any way to disable this feature?
(Spyder maintainer here) No, there is no way to prevent Spyder from opening again the files you left open before closing it.

Turtle and QPython

I have been playing with basic Python(2.3) on my PC (which has Windows 8 OS) for awhile, but my PC broke and I now just have my Android Kitkat tablet.
I downloaded Qpython and have been using that, but when I try to import and start turtle - in the way I have always done on my PC, it just runs:
ImportError : No module named turtle
Is there another way to run turtle on QPython? Or is turtle not able to run on Android?
Turtle works with tkinter but tkinter isn't working on mobile device. You may use kivy to do so and kivy is cross-plateform for your android and also your PC. I've never use it but I'm going to get a try. I think it may solve your problem.

chromebook crouton install raring with cli-extra, so no pdf view in emacs?

Total newbie questions, here. But I installed raring with cli-extra options. Then installed emacs24. I installed texlive. Now with C-c C-c command I can compile .tex documents in emacs. But I don't get a view of it.
My question is, is this because I never installed an X interface? Or is because I am accessing emacs through SecureShell in the ChromeOS?
Thanks so much, please correct any misunderstandings I have. Anyone have suggestions where I can look to find out?
Without a desktop environment there isn't anything that will be able to display images (the pdf).
An example of this is when you have images like pngs in your .emacs.desktop and you open it in no window mode (-nw), emacs gives an error as linux terminals don't support images.
If you want this functionality I'd recommend either loading a desktop manager like xfce, or open the pdf in chrome os, and hopefully it will update automatically when the pdf is re-rendered, otherwise you should just be able to refresh to update it.

Running just the matlab editor

Is there a way to just run the matlab (7.9.0) editor and not the rest of the "desktop" on linux?
This can't be done directly, because the editor stopped being a stand-alone executable many releases ago. It is now launched as a separate Java window from the Matlab desktop. However, you could try hiding the desktop once the editor is displayed, using the following simple code snippet:
com.mathworks.mde.desk.MLDesktop.getInstance.getMainFrame.hide % to hide desktop
com.mathworks.mde.desk.MLDesktop.getInstance.getMainFrame.show % to show desktop
Note that if your editor is docked to the desktop, it will be hidden together with the desktop, so be careful...
No, this is no longer possible since r2007a.
You can get Matlab syntax highlighting for emacs and vi, though.
On my windows machine, I can start MATLAB with the -nodesktop option, then once in the command prompt, I start only the editor with edit.
Im not sure if this is different in terms of memory space used, but this way you only get the editor and the command prompt (no auto-completion though)
You can add Matlab syntax highlighting to Kate via a plugin. I don't know about gedit, but there's probably an addon for that as well.

Resources