_From [email protected] on 2014-09-12T11:33:00Z_
When I open multiple ipython consoles, they have non human readable names, it could be nice to give them custom name.
_Original issue: http://code.google.com/p/spyderlib/issues/detail?id=1962_
_From ccordoba12 on 2014-09-27T05:28:21Z_
we could a context menu option to let rename a client. This is defined in widgets/ipython.py menu_actions.
Labels: Easy
_From ccordoba12 on 2014-11-18T15:43:37Z_
Status: Accepted
Labels: MS-v2.3.3
_From ccordoba12 on 2015-01-08T15:05:14Z_
Summary: Allow to rename IPython consoles (was: Spyder should allow give ipython sessions a logical human readable name)
Labels: -MS-v2.3.3 MS-v2.3.4
Hi guys,
I love Spyder and would like to engage on its development. Was looking for an easy feature to start with and this seems doable. Been working with Python for a while, have no experience on collaborative coding but learn fast.
May I help?
Regards
hi @tjolive thanks for your interest in helping us out. I would recommend you to start by reading the wiki the section on contributing and github workflow.
Cheers
hi @goanpeca thanks for the swift reply. Docs are read, fork is made. btw: wiki on contributing has a big "TODO" :)
Do you have already any idea on how to rename the consoles?
Squashing commits is an advanced topic, so you don't really need it :-) at this point
Spyder in general work like this. We have widgets stored here that should be self contained (should run by themselves) and there are plugins, which are wrappers over the widgets that allow communication among them. So a plugin can communicate with another plugin via signals and slots (a Qt/PyQt mechanism)
The plugin is located https://github.com/spyder-ide/spyder/blob/master/spyder/plugins/ipythonconsole.py
And the widget is located here
Hope that helps, cheers!
hi @goanpeca , thank you for the intro. I'm now doing reverse engineering on the app's structure and there is a learning curve. Hope you guys are not in a hurry for this one :) Anyway, please assign it to me.
The solutions I'm aiming:
Hi @tjolive sure dude, take your time ;-), you have like a couple of months...
I think solution 1 is a good start. Once you have that working we can do solution 2 which should be straightforward to do. Dont know if solution 3 I understand, but I would expect a normal double click to allow renaming the tab.
@tjolive, please be sure to make your PR against the 3.x branch instead of master if you want to see your work on Spyder 3.2 instead of 4.0 ;-)
@ccordoba12 : thanks for the heads up, forking 3.x now.
I have already something working, with a QLineEdit over the tab but there's still some fine tuning to do. Currently I'm working with "tabs.py" which is used by IPythonConsole but also by externalconsole and history (for now).
Q1: do we want to restrict the "tab name changing" to IPythonConsole only or shall we expose this for any other widgets that utilize the _Tabs_ class?
Q2: the editor widget is using _BaseTabs_, which for example don't allow moving tabs. Do you know the reason for this? I would see value in moving editor tabs and even renaming them (even though that would require changes on the tooltip, etc since now tab name = file name)
Q1: do we want to restrict the "tab name changing" to IPythonConsole only or shall we expose this for any other widgets that utilize the Tabs class?
For now lets limit this to ipython consoles as is the only place where I this making sense at the moment. Normal python consoles will be removed for 4.0 and we will unify things on the ipython one.
Q2: the editor widget is using BaseTabs, which for example don't allow moving tabs. Do you know the reason for this? I would see value in moving editor tabs and even renaming them (even though that would require changes on the tooltip, etc since now tab name = file name)
This is being tackled by @rlaverde on another pull request so you can safely ignore those for now and focus on the ones that affect the ipython widget.
Cheers and thanks for working on this :-)
PR created, let me know of your feedback
Haven't checked the PR yet, but I can't wait for this feature to be merged! Seems like such an obvious inclusion, so I'm glad that you took the initiative to implement it, @tjolive!