-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
New IPython Console (Spyder 2.2+): add an option to customize In/Out prompts #1056
Comments
From pierre.raybaut on 2012-05-27T04:42:48Z Labels: Cat-IPythonConsole |
From pierre.raybaut on 2012-05-27T04:58:54Z Labels: -Type-Defect Type-Task |
From pierre.raybaut on 2012-05-27T05:05:37Z Note: I've just checked there is even no need to check if the In/Out prompt texts are valid or not (IPython won't complain). |
From ccordoba12 on 2012-05-27T05:13:58Z If I may ask: why is this important to you? It seems fairly advanced, I mean, to add it as an option... |
From pierre.raybaut on 2012-05-27T06:13:07Z The only reason why I suggested this is because, when exploring the IPython widget API, I noticed that these two properties (in_prompt, out_prompt) were very easy to change dynamically. That's all! Apart from that, I have absolutely no interest of changing these prompts. But from time time, a user comes and asks for this kind of feature. So let's keep it here until (undone) and wait until someone asks about it (it will come!) and then we'll integrate it. That's why I wrote all this: to remind of how to implement this feature when it is time. |
From pierre.raybaut on 2012-05-27T13:17:44Z Labels: -Priority-Medium Priority-Low |
From ccordoba12 on 2012-07-05T20:14:35Z Blocking: spyderlib:1053 |
From ccordoba12 on 2012-10-27T19:49:11Z This issue was updated by revision 372f61e399c7 . Status: Started |
From ccordoba12 on 2013-01-27T12:13:59Z Status: Fixed |
From ccordoba12 on 2015-02-15T16:14:33Z Labels: -Component-IPython |
From pierre.raybaut on 2012-05-26T09:08:10Z
With IPython, it is very easy to customize the input/output prompts.
Default input prompt:
u'In [%i]: '
Default output prompt:
u'Out[%i]: '
To add this option, this is very simple. Do the same way as the option implemnted to set font. But the property to be used is: 'in_prompt' or 'out_prompt' instead of 'font'.
So, in 'apply_settings' and 'register_client', add something like that:
shellwidget.set_in_prompt(in_prompt_text)
shellwidget.set_out_prompt(out_prompt_text)
and in 'IPythonClient', add methods like those:
Original issue: http://code.google.com/p/spyderlib/issues/detail?id=1056
The text was updated successfully, but these errors were encountered: