Using qtconsole in 0.12, tooltips with long lines run off screen due to no wrapping (i.e. long function definitions). Also, the tooltip is truncated at the bottom. Is there a setting to increase the tooltip window height or to be able to page in the tooltip window?
I don't think we want (or even can have) paging in the tooltip. The point of the tooltip is quick, lightweight info. For this same reason we do need wrapping, because it shouldn't fill the screen in either dimension. If you want to go through the potential pages and pages of a docstring, you should use '?', which will use the pager.
One thing that would be nice to have is the [more information...] message at the bottom of the tooltip to be a clickable button/link which, when clicked, would open the pager. The console already has all the info necessary so it should be able to simply open the pager with it.
@epatters, do you think that's easy/realistic? If so, we can leave this open (low priority) in case you or someone else has a chance to tackle it. If you think it's doable but you don't have the time right now, it would be great if you can drop any pointers you might have off the top of your head on where to look. That might entice a motivated user to have a go at it. Often simply pointing people in the right direction so they know where to start suffices to get them doing a lot of work :)
@fperez, this should be straightforward: CallTipWidget uses QLabel, which supports rich text (including hyperlinks). CallTipWidget can be modified to emit a signal requesting a full page.
I've assigned the issue to myself, but I don't know when I will actually be able to get it done. If anyone is interested in implementing this and needs more detailed advice, ping me.
Great @epatters, many thanks. We'll see if anyone bites, if not eventually you'll find a slot to deal with it. Much appreciated.
Thanks. I'm too new to python help much, but here is how I would like to interact with ipython:
I would like to have a permanent, scrollable tooltip frame that gets updated when I type "(". Then I can look at the help as I compose my command in the console. Seems like that would be doable by not timing out the tooltip pop-up and refreshing it whenever "(" appears.
@dallasmasters, that sounds like a cool idea, as long as it can be done in a very unobtrusive way. Right now the tooltip is somewhat obtrusive, but that's because it's meant to go away when you keep typing. I actually very much like the idea of a more persistent area for this kind of info, but it would have to be smaller, as screen real estate is a limited resource in places like small laptops.
But if anyone can come up with a nice implementation of this that doesn't get too much in the way, I'm sure we'd be happy to review it. Not being a UI gury (not by a long shot!), I have precious few concrete suggestions to make here...
I have been going back and forth using both spyder and ipython, and I wanted to concentrate on learning just ipython since it is more powerful. But spyder has code for exactly what I'm describing (a static doc window that updates from what is typed in the console). It also has the transient tooltip just like ipython-qtconsole, but they format as HTML and replace line breaks with to avoid the wrap problem for long function definitions. Thanks for considering it, and I'll try my best to hack something from spyder if I can.
This sounds like a good idea, but please consider one point: taking inspiration from spyder is totally ok, but you shouldn't look at any code in spyder to use it in ipython, because spyder is a GPL project and IPython is a BSD project. If you would like to use some ideas from spyder's code, please contact the spyder developers first and obtain their explicit authorization to relicense the pieces of code you may want to use as BSD for use in IPython. Otherwise we can't accept the code.
I know this sounds harsh, and since we have a good relation with the spyder lead I'm sure it would be possible to ask nicely. But I want to make sure that we play completely by the rules regarding potential uses of GPL code, and also that you don't potentially waste your time working on a contribution we might not be able to use for licensing reasons.
I agree that a pop-up window that contains the full doc would be nice if it was scrollable especially via a key binding. Also if it was possible to call tool tips up within a function after the tool tip disappears via a key binding. Sometimes I need to change the behavior but may not remember the parameter, etc... This would be helpful. Just my two cents.
Maybe a magic function to call up a permanent tool tip window like mentioned @dallasmasters. Essentially act somewhat like a graph window but contain tool tips etc... like I'm assuming Spyder or other ide's do. I don't know a lot about the structure of Ipython code so no idea how to implement this though.
Tooltip have wrapping now, and we can use ?? for a pager. I'll close that,
No offense, but how can the tooltip pop-up be disabled? It opens right after typing an open parenthesis but usually I do not need the information it provides. Thanks.
jupyter qtconsole --JupyterWidget.enable_calltips=False
c.JupyterWidget.enable_calltips = False
Thank you for the information. Based on it I was able to disable tooltips in IPython QtConsole 3.2.0 by running the following on Windows 7:
C:\Anaconda\pythonw.exe "C:\Anaconda\Scripts/ipython-script.py" qtconsole --IPythonWidget.enable_calltips=False
This is automated by configuring it as the Target in my IPython QTConsole icons for Python 3.4.3 and 2.7.10.
In ~/.ipython/profile_ipython_config.py/ I found ipython_qtconsole_config.py, set c.IPythonWidget.enable_calltips = True in it and copyied it to ~/.ipython/profile_default/, but that had no effect. I tried a number of other locations for ipython_qtconsole_config.py including ~/.ipython/profile_default/startup/, ~/.jupyter/ and ~/.qtconsole/, but none had any effect.
I guess that your advice concerning jupyter and JupyterWidget pertains to IPython 4. I installed IPython 4.0.0 with IPython QTConsole 4.0.1, but afterwards was unable to launch IPython QTConsole and had to regress from that configuration. I sent a message to Continuum Analytics about that with no reply yet.