From bussonniermatthias at gmail.com Tue Jul 5 19:41:40 2016 From: bussonniermatthias at gmail.com (Matthias Bussonnier) Date: Tue, 5 Jul 2016 16:41:40 -0700 Subject: [IPython-dev] IPython 5.0.0rc1 Message-ID: Hi all, I'm happy to announce IPython 5.0.0rc1, hopefully that will be the last before the final version. Upgrade with $ pip install ipython --upgrade --pre We have 1 outstanding issue where `%matplotlib qt` on Windows is currently broken, we would need help in getting that fixed as most of the dev dont have windows available. - https://github.com/ipython/ipython/issues/9652 The time since Beta4 have been longer than usual as we were waiting for some upstream fixes. Big improvement and efforts on the documentation side, that you can view on readthedocs: http://ipython.readthedocs.io/en/latest/ In particular the what's new is of interest: http://ipython.readthedocs.io/en/latest/whatsnew/version5.html Since Beta 4 we had the following noticeable points. - Attempt to document most of prompt_toolkit shortcuts (vi and emacs mode) - lots of cleanup of readline-relative code that should be unused, and added quite a bit of DeprecationWarnings in places that needed them. - restore color in IPython.embed() - TerminalInteractiveShell.colors gain a "Neutral" theme now the default, that should be visible both on light and dark BG. the `linux` and `lightbg` variant have now more contrast, and can be switched live with `%colors` magic. - lots of edge-case bug fix/crash. Related info: - There were upload issue with warehouse, If install fail, or you have weirds issue, feel free to tell us. - Jupyter console 5 is out, not much change from beta. It fix compatibility issues with IPython 5.0 - Hopefully I'll release 5.0 by end of week/early next week, before or during SciPy with a bigger announce on the Jupyter blog. Thanks all -- M From asmeurer at gmail.com Tue Jul 5 20:22:09 2016 From: asmeurer at gmail.com (Aaron Meurer) Date: Tue, 5 Jul 2016 20:22:09 -0400 Subject: [IPython-dev] IPython 5.0.0rc1 In-Reply-To: References: Message-ID: Minor annoyance with the emacs bindings: C-k at the end of a line should delete the newline. Probably also the reverse for C-u. Question: with the new multiline editing, up arrow (and C-p) just move up a line. Is there a fast way to cycle through the history without going up one line at a time in each history item? Bug under the emacs bindings: M-d under a single character doesn't delete the character. Aaron Meurer On Tue, Jul 5, 2016 at 7:41 PM, Matthias Bussonnier wrote: > Hi all, > > I'm happy to announce IPython 5.0.0rc1, hopefully that will be the last before > the final version. Upgrade with > > $ pip install ipython --upgrade --pre > > We have 1 outstanding issue where `%matplotlib qt` on Windows is currently > broken, we would need help in getting that fixed as most of the dev dont have > windows available. > > - https://github.com/ipython/ipython/issues/9652 > > > The time since Beta4 have been longer than usual as we were waiting for some > upstream fixes. > > Big improvement and efforts on the documentation side, that you can view on > readthedocs: > > http://ipython.readthedocs.io/en/latest/ > > In particular the what's new is of interest: > > http://ipython.readthedocs.io/en/latest/whatsnew/version5.html > > > > Since Beta 4 we had the following noticeable points. > - Attempt to document most of prompt_toolkit shortcuts (vi and emacs mode) > - lots of cleanup of readline-relative code that should be unused, and added > quite a bit of DeprecationWarnings in places that needed them. > - restore color in IPython.embed() > - TerminalInteractiveShell.colors gain a "Neutral" theme now the default, that > should be visible both on light and dark BG. the `linux` and `lightbg` > variant have now more contrast, and can be switched live with `%colors` > magic. > - lots of edge-case bug fix/crash. > > > > Related info: > > - There were upload issue with warehouse, If install fail, or you have weirds > issue, feel free to tell us. > > - Jupyter console 5 is out, not much change from beta. It fix compatibility > issues with IPython 5.0 > > - Hopefully I'll release 5.0 by end of week/early next week, before or during > SciPy with a bigger announce on the Jupyter blog. > > Thanks all > -- > M > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > https://mail.scipy.org/mailman/listinfo/ipython-dev From nathan12343 at gmail.com Tue Jul 5 20:34:01 2016 From: nathan12343 at gmail.com (Nathan Goldbaum) Date: Tue, 5 Jul 2016 19:34:01 -0500 Subject: [IPython-dev] IPython 5.0.0rc1 In-Reply-To: References: Message-ID: On Tue, Jul 5, 2016 at 7:22 PM, Aaron Meurer wrote: > Minor annoyance with the emacs bindings: C-k at the end of a line > should delete the newline. Probably also the reverse for C-u. > > Question: with the new multiline editing, up arrow (and C-p) just move > up a line. Is there a fast way to cycle through the history without > going up one line at a time in each history item? > C-up arrow and C-down arrow. > > Bug under the emacs bindings: M-d under a single character doesn't > delete the character. > > Aaron Meurer > > On Tue, Jul 5, 2016 at 7:41 PM, Matthias Bussonnier > wrote: > > Hi all, > > > > I'm happy to announce IPython 5.0.0rc1, hopefully that will be the last > before > > the final version. Upgrade with > > > > $ pip install ipython --upgrade --pre > > > > We have 1 outstanding issue where `%matplotlib qt` on Windows is > currently > > broken, we would need help in getting that fixed as most of the dev dont > have > > windows available. > > > > - https://github.com/ipython/ipython/issues/9652 > > > > > > The time since Beta4 have been longer than usual as we were waiting for > some > > upstream fixes. > > > > Big improvement and efforts on the documentation side, that you can view > on > > readthedocs: > > > > http://ipython.readthedocs.io/en/latest/ > > > > In particular the what's new is of interest: > > > > http://ipython.readthedocs.io/en/latest/whatsnew/version5.html > > > > > > > > Since Beta 4 we had the following noticeable points. > > - Attempt to document most of prompt_toolkit shortcuts (vi and emacs > mode) > > - lots of cleanup of readline-relative code that should be unused, and > added > > quite a bit of DeprecationWarnings in places that needed them. > > - restore color in IPython.embed() > > - TerminalInteractiveShell.colors gain a "Neutral" theme now the > default, that > > should be visible both on light and dark BG. the `linux` and `lightbg` > > variant have now more contrast, and can be switched live with > `%colors` > > magic. > > - lots of edge-case bug fix/crash. > > > > > > > > Related info: > > > > - There were upload issue with warehouse, If install fail, or you have > weirds > > issue, feel free to tell us. > > > > - Jupyter console 5 is out, not much change from beta. It fix > compatibility > > issues with IPython 5.0 > > > > - Hopefully I'll release 5.0 by end of week/early next week, before or > during > > SciPy with a bigger announce on the Jupyter blog. > > > > Thanks all > > -- > > M > > _______________________________________________ > > IPython-dev mailing list > > IPython-dev at scipy.org > > https://mail.scipy.org/mailman/listinfo/ipython-dev > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > https://mail.scipy.org/mailman/listinfo/ipython-dev > -------------- next part -------------- An HTML attachment was scrubbed... URL: From fperez.net at gmail.com Tue Jul 5 20:43:15 2016 From: fperez.net at gmail.com (Fernando Perez) Date: Tue, 5 Jul 2016 17:43:15 -0700 Subject: [IPython-dev] IPython 5.0.0rc1 In-Reply-To: References: Message-ID: On Tue, Jul 5, 2016 at 5:34 PM, Nathan Goldbaum wrote: > On Tue, Jul 5, 2016 at 7:22 PM, Aaron Meurer wrote: > >> Minor annoyance with the emacs bindings: C-k at the end of a line >> should delete the newline. Probably also the reverse for C-u. >> >> Question: with the new multiline editing, up arrow (and C-p) just move >> up a line. Is there a fast way to cycle through the history without >> going up one line at a time in each history item? >> > > C-up arrow and C-down arrow. > Mmmh, I don't think that's what Aaron is asking: those still make you walk through each line of a multi-line history entry. At least that's what I'm getting on OSX with master (git 74b0369) I think what Aaron wants is a way to retrieve entire history items one at a time, even if they are multi-line... I couldn't find a way to do that, but Matthias is much more up to speed on the intricacies of the new keybinding machinery. Cheers f -- Fernando Perez (@fperez_org; http://fperez.org) fperez.net-at-gmail: mailing lists only (I ignore this when swamped!) fernando.perez-at-berkeley: contact me here for any direct mail -------------- next part -------------- An HTML attachment was scrubbed... URL: From bussonniermatthias at gmail.com Tue Jul 5 21:22:41 2016 From: bussonniermatthias at gmail.com (Matthias Bussonnier) Date: Tue, 5 Jul 2016 18:22:41 -0700 Subject: [IPython-dev] IPython 5.0.0rc1 In-Reply-To: References: Message-ID: >> >> On Tue, Jul 5, 2016 at 7:22 PM, Aaron Meurer wrote: >>> >>> Minor annoyance with the emacs bindings: C-k at the end of a line >>> should delete the newline. Probably also the reverse for C-u. Can you open issues for these ? I guess we might bring them upstream to Prompt_toolit. >>> >>> Question: with the new multiline editing, up arrow (and C-p) just move >>> up a line. Is there a fast way to cycle through the history without >>> going up one line at a time in each history item? Page-Up / Page-Down (fn-up/fn-down should work too At least it works for me on mac), and indeed it's one of the things that annoyed me a bit, but my muscle memory adjusted quite fast. >> C-up arrow and C-down arrow. > > Mmmh, I don't think that's what Aaron is asking: those still make you walk > through each line of a multi-line history entry. At least that's what I'm > getting on OSX with master (git 74b0369) > > I think what Aaron wants is a way to retrieve entire history items one at a > time, even if they are multi-line... I couldn't find a way to do that, but > Matthias is much more up to speed on the intricacies of the new keybinding > machinery. I thought you were the IPython Guru. -- M From fperez.net at gmail.com Tue Jul 5 21:31:43 2016 From: fperez.net at gmail.com (Fernando Perez) Date: Tue, 5 Jul 2016 18:31:43 -0700 Subject: [IPython-dev] IPython 5.0.0rc1 In-Reply-To: References: Message-ID: On Tue, Jul 5, 2016 at 6:22 PM, Matthias Bussonnier < bussonniermatthias at gmail.com> wrote: > Page-Up / Page-Down (fn-up/fn-down should work too > At least it works for me on mac), and indeed it's one of the things > that annoyed me a bit, > but my muscle memory adjusted quite fast. > Unfortunately on OSX that only works on iTerm2. On the default OSX Termina, for me Page up/down simply scroll the entire terminal. -- Fernando Perez (@fperez_org; http://fperez.org) fperez.net-at-gmail: mailing lists only (I ignore this when swamped!) fernando.perez-at-berkeley: contact me here for any direct mail -------------- next part -------------- An HTML attachment was scrubbed... URL: From bussonniermatthias at gmail.com Tue Jul 5 21:43:19 2016 From: bussonniermatthias at gmail.com (Matthias Bussonnier) Date: Tue, 5 Jul 2016 18:43:19 -0700 Subject: [IPython-dev] IPython 5.0.0rc1 In-Reply-To: References: Message-ID: Just bind your PageUp/Down in Terminal.App to the correct escape sequeces: Terminal > preferences > keyboard > + To respectively PgUp: \033[5~ and PgDown: \033[6~ the `\033` can be obtain by pressing `Esc` and **not** by pressing `\`,`0`,`3`,`3` in sequence. -- M On Tue, Jul 5, 2016 at 6:31 PM, Fernando Perez wrote: > > On Tue, Jul 5, 2016 at 6:22 PM, Matthias Bussonnier > wrote: >> >> Page-Up / Page-Down (fn-up/fn-down should work too >> At least it works for me on mac), and indeed it's one of the things >> that annoyed me a bit, >> but my muscle memory adjusted quite fast. > > > Unfortunately on OSX that only works on iTerm2. > > On the default OSX Termina, for me Page up/down simply scroll the entire > terminal. > > -- > Fernando Perez (@fperez_org; http://fperez.org) > fperez.net-at-gmail: mailing lists only (I ignore this when swamped!) > fernando.perez-at-berkeley: contact me here for any direct mail > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > https://mail.scipy.org/mailman/listinfo/ipython-dev > -------------- next part -------------- A non-text attachment was scrubbed... Name: Screen Shot 2016-07-05 at 18.39.31.png Type: image/png Size: 326702 bytes Desc: not available URL: From fperez.net at gmail.com Tue Jul 5 21:47:43 2016 From: fperez.net at gmail.com (Fernando Perez) Date: Tue, 5 Jul 2016 18:47:43 -0700 Subject: [IPython-dev] IPython 5.0.0rc1 In-Reply-To: References: Message-ID: On Tue, Jul 5, 2016 at 6:43 PM, Matthias Bussonnier < bussonniermatthias at gmail.com> wrote: > Just bind your PageUp/Down in Terminal.App to the correct escape sequeces: > > Terminal > preferences > keyboard > + > > To respectively PgUp: \033[5~ and PgDown: \033[6~ the `\033` can be > obtain by pressing `Esc` and **not** by pressing `\`,`0`,`3`,`3` in > sequence. > Thanks for that solution! I actually like Pg Up/Down to scroll as I use it a lot, so I'll probably give this up for now. The issue remains that the default for OSX terminal users won't do this, but at least a) it works on iTerm b) there's a workaround if you're willing to sacrifice easy keyboard scrolling on Terminal. -- Fernando Perez (@fperez_org; http://fperez.org) fperez.net-at-gmail: mailing lists only (I ignore this when swamped!) fernando.perez-at-berkeley: contact me here for any direct mail -------------- next part -------------- An HTML attachment was scrubbed... URL: From asmeurer at gmail.com Tue Jul 5 21:53:11 2016 From: asmeurer at gmail.com (Aaron Meurer) Date: Tue, 5 Jul 2016 21:53:11 -0400 Subject: [IPython-dev] IPython 5.0.0rc1 In-Reply-To: References: Message-ID: Could we also map C-v and M-v to page down/up in emacs mode then? Aaron Meurer On Tue, Jul 5, 2016 at 9:47 PM, Fernando Perez wrote: > > On Tue, Jul 5, 2016 at 6:43 PM, Matthias Bussonnier > wrote: >> >> Just bind your PageUp/Down in Terminal.App to the correct escape sequeces: >> >> Terminal > preferences > keyboard > + >> >> To respectively PgUp: \033[5~ and PgDown: \033[6~ the `\033` can be >> obtain by pressing `Esc` and **not** by pressing `\`,`0`,`3`,`3` in >> sequence. > > > Thanks for that solution! I actually like Pg Up/Down to scroll as I use it > a lot, so I'll probably give this up for now. > > The issue remains that the default for OSX terminal users won't do this, but > at least > > a) it works on iTerm > b) there's a workaround if you're willing to sacrifice easy keyboard > scrolling on Terminal. > > > -- > Fernando Perez (@fperez_org; http://fperez.org) > fperez.net-at-gmail: mailing lists only (I ignore this when swamped!) > fernando.perez-at-berkeley: contact me here for any direct mail > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > https://mail.scipy.org/mailman/listinfo/ipython-dev > From bussonniermatthias at gmail.com Tue Jul 5 22:12:38 2016 From: bussonniermatthias at gmail.com (Matthias Bussonnier) Date: Tue, 5 Jul 2016 19:12:38 -0700 Subject: [IPython-dev] IPython 5.0.0rc1 In-Reply-To: References: Message-ID: If they are available, likely yes. We still haven't completly figured out the prompt_toolkit keyboard configuration for it to be easy and declarative. On Tue, Jul 5, 2016 at 6:53 PM, Aaron Meurer wrote: > Could we also map C-v and M-v to page down/up in emacs mode then? > > Aaron Meurer > > On Tue, Jul 5, 2016 at 9:47 PM, Fernando Perez wrote: >> >> On Tue, Jul 5, 2016 at 6:43 PM, Matthias Bussonnier >> wrote: >>> >>> Just bind your PageUp/Down in Terminal.App to the correct escape sequeces: >>> >>> Terminal > preferences > keyboard > + >>> >>> To respectively PgUp: \033[5~ and PgDown: \033[6~ the `\033` can be >>> obtain by pressing `Esc` and **not** by pressing `\`,`0`,`3`,`3` in >>> sequence. >> >> >> Thanks for that solution! I actually like Pg Up/Down to scroll as I use it >> a lot, so I'll probably give this up for now. >> >> The issue remains that the default for OSX terminal users won't do this, but >> at least >> >> a) it works on iTerm >> b) there's a workaround if you're willing to sacrifice easy keyboard >> scrolling on Terminal. >> >> >> -- >> Fernando Perez (@fperez_org; http://fperez.org) >> fperez.net-at-gmail: mailing lists only (I ignore this when swamped!) >> fernando.perez-at-berkeley: contact me here for any direct mail >> >> _______________________________________________ >> IPython-dev mailing list >> IPython-dev at scipy.org >> https://mail.scipy.org/mailman/listinfo/ipython-dev >> > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > https://mail.scipy.org/mailman/listinfo/ipython-dev From klonuo at gmail.com Wed Jul 6 09:15:42 2016 From: klonuo at gmail.com (klo uo) Date: Wed, 6 Jul 2016 15:15:42 +0200 Subject: [IPython-dev] IPython 5.0.0rc1 In-Reply-To: References: Message-ID: On Wed, Jul 6, 2016 at 1:41 AM, Matthias Bussonnier < bussonniermatthias at gmail.com> wrote: > > Since Beta 4 we had the following noticeable points. > - Attempt to document most of prompt_toolkit shortcuts (vi and emacs mode) > Matthias, it seems shortcuts tables didn't get thorough: http://ipython.readthedocs.io/en/latest/config/shortcuts/index.html -------------- next part -------------- An HTML attachment was scrubbed... URL: From stuart at cadair.com Wed Jul 6 10:23:13 2016 From: stuart at cadair.com (Stuart Mumford) Date: Wed, 6 Jul 2016 15:23:13 +0100 Subject: [IPython-dev] Need help review change that affect IPython/Emacs integration. In-Reply-To: References: <17ec3bbb-edd2-941b-045a-0a7f7778748c@cadair.com> Message-ID: <2790533b-5ae7-30c2-ebdb-6d5144ecbca4@cadair.com> That seems to have fixed it. On 24/06/16 14:07, Thomas Kluyver wrote: > Are you using the --simple-prompt flag to instantiate IPython for the > inferior shell? > > On 24 June 2016 at 10:01, Stuart Mumford > wrote: > > Hello, > > I am far from an advanced emacs user, but I have installed IPython > 5.0b4 > and prompt_toolkit 1.0.3 and when I run my inferior ipython shell, it > seems to "work" but no input prompt is shown (see attached > screenshot). > > If you can guide me on debugging and or testing patches I am happy to > help, but can not offer any insight on the emacs side. > > Stuart > > > On 25/05/16 19:56, Aaron Meurer wrote: > > Some potentially useful information about this > > > https://www.masteringemacs.org/article/running-shells-in-emacs-overview. > > > > Aaron Meurer > > > > On Wed, May 25, 2016 at 2:49 PM, Matthias Bussonnier > > > wrote: > >> Hello list, > >> > >> As you might know the current master of IPython is now using > >> Prompt-toolkit to provide crazy awesome multi line-editing, and > >> syntactic coloration. > >> > >> Though it might have some effect with emacs python.el > integration and > >> in particular the 'inferior shell' (whatever that is). > >> > >> We'll appreciate any help on testing potential issues, see here: > >> > >> https://github.com/ipython/ipython/pull/9399 > >> > >> So if you are or know any emacs user that have slightly more > >> competence[1] than us to investigate the emacs side of things, we > >> would really appreciate for you/them to pitch in, and propagate the > >> message. > >> > >> Thanks a lot for your help, > >> -- > >> M > >> > >> [1]: That is to say more than typing `emacs` and then wondering how > >> the hell to quit. > >> _______________________________________________ > >> IPython-dev mailing list > >> IPython-dev at scipy.org > >> https://mail.scipy.org/mailman/listinfo/ipython-dev > > _______________________________________________ > > IPython-dev mailing list > > IPython-dev at scipy.org > > https://mail.scipy.org/mailman/listinfo/ipython-dev > > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > https://mail.scipy.org/mailman/listinfo/ipython-dev > > > > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > https://mail.scipy.org/mailman/listinfo/ipython-dev -------------- next part -------------- An HTML attachment was scrubbed... URL: From bussonniermatthias at gmail.com Wed Jul 6 11:28:59 2016 From: bussonniermatthias at gmail.com (Matthias Bussonnier) Date: Wed, 6 Jul 2016 08:28:59 -0700 Subject: [IPython-dev] IPython 5.0.0rc1 In-Reply-To: References: Message-ID: Yeah I saw that as well, they render locally but not on readthedocs. On Wed, Jul 6, 2016 at 6:15 AM, klo uo wrote: > On Wed, Jul 6, 2016 at 1:41 AM, Matthias Bussonnier > wrote: >> >> >> Since Beta 4 we had the following noticeable points. >> - Attempt to document most of prompt_toolkit shortcuts (vi and emacs >> mode) > > > > Matthias, it seems shortcuts tables didn't get thorough: > http://ipython.readthedocs.io/en/latest/config/shortcuts/index.html > > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > https://mail.scipy.org/mailman/listinfo/ipython-dev > From takowl at gmail.com Wed Jul 6 11:37:43 2016 From: takowl at gmail.com (Thomas Kluyver) Date: Wed, 6 Jul 2016 16:37:43 +0100 Subject: [IPython-dev] IPython 5.0.0rc1 In-Reply-To: References: Message-ID: On 6 July 2016 at 16:28, Matthias Bussonnier wrote: > Yeah I saw that as well, they render locally but not on readthedocs. > Remember RTD doesn't use the Makefile, so extra steps have to be hacked in via the conf.py: https://github.com/ipython/ipython/blob/6f44adf605ed3e55fcbab07d3c0a007a4b6e4a94/docs/source/conf.py#L22-L36 -------------- next part -------------- An HTML attachment was scrubbed... URL: From bussonniermatthias at gmail.com Wed Jul 6 11:41:30 2016 From: bussonniermatthias at gmail.com (Matthias Bussonnier) Date: Wed, 6 Jul 2016 08:41:30 -0700 Subject: [IPython-dev] IPython 5.0.0rc1 In-Reply-To: References: Message-ID: > Remember RTD doesn't use the Makefile, so extra steps have to be hacked in > via the conf.py: > > https://github.com/ipython/ipython/blob/6f44adf605ed3e55fcbab07d3c0a007a4b6e4a94/docs/source/conf.py#L22-L36 [Indistinguishable complaining sounds coming from Berkeley Institute for Data Science offices in the back]. -- M From fperez.net at gmail.com Thu Jul 7 23:09:07 2016 From: fperez.net at gmail.com (Fernando Perez) Date: Thu, 7 Jul 2016 20:09:07 -0700 Subject: [IPython-dev] [ANN] IPython 5.0 is out! Message-ID: Hi all, On behalf of the team, I'm delighted to announce the release of IPython 5.0 today! As we continue building the broader architecture and tools of Project Jupyter, the IPython kernel and shell remain for many python users the "beating heart" of Jupyter and the environment they actually use to interact with their code every day. So we continue making the system better, and especially for terminal users this release brings some very nice enhancements. As usual you can try this new release with: pip install ipython --upgrade or you can wait a bit for it to propagate to the repositories of your favorite packaging system/distribution. You can find more details at the blog: http://blog.jupyter.org/2016/07/08/ipython-5-0-released/ Many thanks to everyone who made this release possible, and in particular to Thomas and Matthias who carried the lion's share of the effort to bring us a lot of very nice new features, as well as to Jonathan Slenders, the author of prompt_toolkit that makes much of the new shiny possible. Cheers, f -- Fernando Perez (@fperez_org; http://fperez.org) fperez.net-at-gmail: mailing lists only (I ignore this when swamped!) fernando.perez-at-berkeley: contact me here for any direct mail -------------- next part -------------- An HTML attachment was scrubbed... URL: From ellisonbg at gmail.com Thu Jul 7 23:11:29 2016 From: ellisonbg at gmail.com (Brian Granger) Date: Thu, 7 Jul 2016 20:11:29 -0700 Subject: [IPython-dev] [jupyter] [ANN] IPython 5.0 is out! In-Reply-To: References: Message-ID: Woohoo, long live classic IPython!!! On Thu, Jul 7, 2016 at 8:09 PM, Fernando Perez wrote: > Hi all, > > On behalf of the team, I'm delighted to announce the release of IPython 5.0 > today! > > As we continue building the broader architecture and tools of Project > Jupyter, the IPython kernel and shell remain for many python users the > "beating heart" of Jupyter and the environment they actually use to interact > with their code every day. > > So we continue making the system better, and especially for terminal users > this release brings some very nice enhancements. > > As usual you can try this new release with: > > pip install ipython --upgrade > > or you can wait a bit for it to propagate to the repositories of your > favorite packaging system/distribution. > > You can find more details at the blog: > http://blog.jupyter.org/2016/07/08/ipython-5-0-released/ > > Many thanks to everyone who made this release possible, and in particular to > Thomas and Matthias who carried the lion's share of the effort to bring us a > lot of very nice new features, as well as to Jonathan Slenders, the author > of prompt_toolkit that makes much of the new shiny possible. > > Cheers, > > f > > -- > Fernando Perez (@fperez_org; http://fperez.org) > fperez.net-at-gmail: mailing lists only (I ignore this when swamped!) > fernando.perez-at-berkeley: contact me here for any direct mail > > -- > You received this message because you are subscribed to the Google Groups > "Project Jupyter" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to jupyter+unsubscribe at googlegroups.com. > To post to this group, send email to jupyter at googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/jupyter/CAHAreOpUSwWH7ZUJZ8p7iuHPKV8-7xXEkjXErJ%3DF1Ga1zRFa_Q%40mail.gmail.com. > For more options, visit https://groups.google.com/d/optout. -- Brian E. Granger Associate Professor of Physics and Data Science Cal Poly State University, San Luis Obispo @ellisonbg on Twitter and GitHub bgranger at calpoly.edu and ellisonbg at gmail.com From bussonniermatthias at gmail.com Thu Jul 7 23:20:20 2016 From: bussonniermatthias at gmail.com (Matthias Bussonnier) Date: Thu, 7 Jul 2016 20:20:20 -0700 Subject: [IPython-dev] [jupyter] [ANN] IPython 5.0 is out! In-Reply-To: References: Message-ID: Thanks all ! Feel free to report any bugs you have, and make pull requests ! In hopefully a month-ish, we can release 5.1, and then start working on 6.0 ! -- M On Thu, Jul 7, 2016 at 8:11 PM, Brian Granger wrote: > Woohoo, long live classic IPython!!! > > On Thu, Jul 7, 2016 at 8:09 PM, Fernando Perez wrote: >> Hi all, >> >> On behalf of the team, I'm delighted to announce the release of IPython 5.0 >> today! >> >> As we continue building the broader architecture and tools of Project >> Jupyter, the IPython kernel and shell remain for many python users the >> "beating heart" of Jupyter and the environment they actually use to interact >> with their code every day. >> >> So we continue making the system better, and especially for terminal users >> this release brings some very nice enhancements. >> >> As usual you can try this new release with: >> >> pip install ipython --upgrade >> >> or you can wait a bit for it to propagate to the repositories of your >> favorite packaging system/distribution. >> >> You can find more details at the blog: >> http://blog.jupyter.org/2016/07/08/ipython-5-0-released/ >> >> Many thanks to everyone who made this release possible, and in particular to >> Thomas and Matthias who carried the lion's share of the effort to bring us a >> lot of very nice new features, as well as to Jonathan Slenders, the author >> of prompt_toolkit that makes much of the new shiny possible. >> >> Cheers, >> >> f >> >> -- >> Fernando Perez (@fperez_org; http://fperez.org) >> fperez.net-at-gmail: mailing lists only (I ignore this when swamped!) >> fernando.perez-at-berkeley: contact me here for any direct mail >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Project Jupyter" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to jupyter+unsubscribe at googlegroups.com. >> To post to this group, send email to jupyter at googlegroups.com. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/jupyter/CAHAreOpUSwWH7ZUJZ8p7iuHPKV8-7xXEkjXErJ%3DF1Ga1zRFa_Q%40mail.gmail.com. >> For more options, visit https://groups.google.com/d/optout. > > > > -- > Brian E. Granger > Associate Professor of Physics and Data Science > Cal Poly State University, San Luis Obispo > @ellisonbg on Twitter and GitHub > bgranger at calpoly.edu and ellisonbg at gmail.com > > -- > You received this message because you are subscribed to the Google Groups "Project Jupyter" group. > To unsubscribe from this group and stop receiving emails from it, send an email to jupyter+unsubscribe at googlegroups.com. > To post to this group, send email to jupyter at googlegroups.com. > To view this discussion on the web visit https://groups.google.com/d/msgid/jupyter/CAH4pYpTgvocZq%3Dj9goeBoqsXMV-5qrazB4hw%3DdFVUxerVtZopA%40mail.gmail.com. > For more options, visit https://groups.google.com/d/optout. From wes.turner at gmail.com Fri Jul 8 00:18:58 2016 From: wes.turner at gmail.com (Wes Turner) Date: Thu, 7 Jul 2016 23:18:58 -0500 Subject: [IPython-dev] [ANN] IPython 5.0 is out! In-Reply-To: References: Message-ID: I'm pretty excited about the upgrade from readline to prompt_toolkit: * https://pypi.python.org/pypi/prompt_toolkit On Thu, Jul 7, 2016 at 10:09 PM, Fernando Perez wrote: > Hi all, > > On behalf of the team, I'm delighted to announce the release of IPython > 5.0 today! > > As we continue building the broader architecture and tools of Project > Jupyter, the IPython kernel and shell remain for many python users the > "beating heart" of Jupyter and the environment they actually use to > interact with their code every day. > > So we continue making the system better, and especially for terminal users > this release brings some very nice enhancements. > > As usual you can try this new release with: > > pip install ipython --upgrade > > or you can wait a bit for it to propagate to the repositories of your > favorite packaging system/distribution. > > You can find more details at the blog: > http://blog.jupyter.org/2016/07/08/ipython-5-0-released/ > > Many thanks to everyone who made this release possible, and in particular > to Thomas and Matthias who carried the lion's share of the effort to bring > us a lot of very nice new features, as well as to Jonathan Slenders, the > author of prompt_toolkit that makes much of the new shiny possible. > > Cheers, > > f > > -- > Fernando Perez (@fperez_org; http://fperez.org) > fperez.net-at-gmail: mailing lists only (I ignore this when swamped!) > fernando.perez-at-berkeley: contact me here for any direct mail > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > https://mail.scipy.org/mailman/listinfo/ipython-dev > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From francois.dion at gmail.com Fri Jul 8 07:43:15 2016 From: francois.dion at gmail.com (Francois Dion) Date: Fri, 08 Jul 2016 07:43:15 -0400 Subject: [IPython-dev] [ANN] IPython 5.0 is out! In-Reply-To: References: Message-ID: <20160708114315.5623887.11192.99449@gmail.com> An HTML attachment was scrubbed... URL: From carl.input at gmail.com Fri Jul 8 08:02:53 2016 From: carl.input at gmail.com (Carl Smith) Date: Fri, 8 Jul 2016 13:02:53 +0100 Subject: [IPython-dev] [jupyter] [ANN] IPython 5.0 is out! In-Reply-To: References: Message-ID: IPython 5 is amazing! The switch to prompt_toolkit makes me happy even when I'm not on my computer. It feels a bit like a war has ended! Thanks for everything guys. -- Carl Smith carl.input at gmail.com On 8 July 2016 at 04:20, Matthias Bussonnier wrote: > Thanks all ! > > Feel free to report any bugs you have, and make pull requests ! In > hopefully a month-ish, we can release 5.1, and then start working on > 6.0 ! > -- > M > > On Thu, Jul 7, 2016 at 8:11 PM, Brian Granger wrote: > > Woohoo, long live classic IPython!!! > > > > On Thu, Jul 7, 2016 at 8:09 PM, Fernando Perez > wrote: > >> Hi all, > >> > >> On behalf of the team, I'm delighted to announce the release of IPython > 5.0 > >> today! > >> > >> As we continue building the broader architecture and tools of Project > >> Jupyter, the IPython kernel and shell remain for many python users the > >> "beating heart" of Jupyter and the environment they actually use to > interact > >> with their code every day. > >> > >> So we continue making the system better, and especially for terminal > users > >> this release brings some very nice enhancements. > >> > >> As usual you can try this new release with: > >> > >> pip install ipython --upgrade > >> > >> or you can wait a bit for it to propagate to the repositories of your > >> favorite packaging system/distribution. > >> > >> You can find more details at the blog: > >> http://blog.jupyter.org/2016/07/08/ipython-5-0-released/ > >> > >> Many thanks to everyone who made this release possible, and in > particular to > >> Thomas and Matthias who carried the lion's share of the effort to bring > us a > >> lot of very nice new features, as well as to Jonathan Slenders, the > author > >> of prompt_toolkit that makes much of the new shiny possible. > >> > >> Cheers, > >> > >> f > >> > >> -- > >> Fernando Perez (@fperez_org; http://fperez.org) > >> fperez.net-at-gmail: mailing lists only (I ignore this when swamped!) > >> fernando.perez-at-berkeley: contact me here for any direct mail > >> > >> -- > >> You received this message because you are subscribed to the Google > Groups > >> "Project Jupyter" group. > >> To unsubscribe from this group and stop receiving emails from it, send > an > >> email to jupyter+unsubscribe at googlegroups.com. > >> To post to this group, send email to jupyter at googlegroups.com. > >> To view this discussion on the web visit > >> > https://groups.google.com/d/msgid/jupyter/CAHAreOpUSwWH7ZUJZ8p7iuHPKV8-7xXEkjXErJ%3DF1Ga1zRFa_Q%40mail.gmail.com > . > >> For more options, visit https://groups.google.com/d/optout. > > > > > > > > -- > > Brian E. Granger > > Associate Professor of Physics and Data Science > > Cal Poly State University, San Luis Obispo > > @ellisonbg on Twitter and GitHub > > bgranger at calpoly.edu and ellisonbg at gmail.com > > > > -- > > You received this message because you are subscribed to the Google > Groups "Project Jupyter" group. > > To unsubscribe from this group and stop receiving emails from it, send > an email to jupyter+unsubscribe at googlegroups.com. > > To post to this group, send email to jupyter at googlegroups.com. > > To view this discussion on the web visit > https://groups.google.com/d/msgid/jupyter/CAH4pYpTgvocZq%3Dj9goeBoqsXMV-5qrazB4hw%3DdFVUxerVtZopA%40mail.gmail.com > . > > For more options, visit https://groups.google.com/d/optout. > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > https://mail.scipy.org/mailman/listinfo/ipython-dev > -------------- next part -------------- An HTML attachment was scrubbed... URL: From carl.input at gmail.com Sat Jul 9 10:59:08 2016 From: carl.input at gmail.com (Carl Smith) Date: Sat, 9 Jul 2016 15:59:08 +0100 Subject: [IPython-dev] [IPython 5] [Docs] Custom Terminal Prompts Message-ID: Just been trying to set up a custom prompt with the new prompt_toolkit features, and couldn't figure it out from the IPython docs. Perhaps adding an example class would make things clear. Thanks, -- Carl Smith carl.input at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From takowl at gmail.com Sat Jul 9 12:06:43 2016 From: takowl at gmail.com (Thomas Kluyver) Date: Sat, 9 Jul 2016 17:06:43 +0100 Subject: [IPython-dev] [IPython 5] [Docs] Custom Terminal Prompts In-Reply-To: References: Message-ID: On 9 July 2016 at 15:59, Carl Smith wrote: > Just been trying to set up a custom prompt with the new prompt_toolkit > features, and couldn't figure it out from the IPython docs. Perhaps adding > an example class would make things clear. In the absence of examples in the docs, the prompt classes in the code might be worth a look: https://github.com/ipython/ipython/blob/master/IPython/terminal/prompts.py -------------- next part -------------- An HTML attachment was scrubbed... URL: From carl.input at gmail.com Sat Jul 9 15:30:17 2016 From: carl.input at gmail.com (Carl Smith) Date: Sat, 09 Jul 2016 19:30:17 +0000 Subject: [IPython-dev] [IPython 5] [Docs] Custom Terminal Prompts In-Reply-To: References: Message-ID: Thanks Thomas. Appreciated. On Sat, 9 Jul 2016 17:07 Thomas Kluyver, wrote: > On 9 July 2016 at 15:59, Carl Smith wrote: > >> Just been trying to set up a custom prompt with the new prompt_toolkit >> features, and couldn't figure it out from the IPython docs. Perhaps adding >> an example class would make things clear. > > > In the absence of examples in the docs, the prompt classes in the code > might be worth a look: > > https://github.com/ipython/ipython/blob/master/IPython/terminal/prompts.py > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > https://mail.scipy.org/mailman/listinfo/ipython-dev > -------------- next part -------------- An HTML attachment was scrubbed... URL: From carl.input at gmail.com Sat Jul 9 19:44:23 2016 From: carl.input at gmail.com (Carl Smith) Date: Sun, 10 Jul 2016 00:44:23 +0100 Subject: [IPython-dev] Highlighting of paths in commands stopped working. Message-ID: When trying out the IPython 5 release candidate, when typing something like `cd /foo/bar`, the slashes would be a different colour to the rest of the text. Now using IPython 5 stable, it's all one colour. I can't figure out why, so wondered if it was changed or if I broke something. Thanks, -- Carl Smith carl.input at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From fperez.net at gmail.com Sun Jul 10 19:01:08 2016 From: fperez.net at gmail.com (Fernando Perez) Date: Sun, 10 Jul 2016 16:01:08 -0700 Subject: [IPython-dev] [IPython 5] [Docs] Custom Terminal Prompts In-Reply-To: References: Message-ID: BTW, Carl, if you come up with a nice example that works for you, a small PR contribution to the docs would be greatly appreciated, so it helps others in the future! Cheers f On Sat, Jul 9, 2016 at 12:30 PM, Carl Smith wrote: > Thanks Thomas. Appreciated. > > On Sat, 9 Jul 2016 17:07 Thomas Kluyver, wrote: > >> On 9 July 2016 at 15:59, Carl Smith wrote: >> >>> Just been trying to set up a custom prompt with the new prompt_toolkit >>> features, and couldn't figure it out from the IPython docs. Perhaps adding >>> an example class would make things clear. >> >> >> In the absence of examples in the docs, the prompt classes in the code >> might be worth a look: >> >> https://github.com/ipython/ipython/blob/master/IPython/terminal/prompts.py >> _______________________________________________ >> IPython-dev mailing list >> IPython-dev at scipy.org >> https://mail.scipy.org/mailman/listinfo/ipython-dev >> > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > https://mail.scipy.org/mailman/listinfo/ipython-dev > > -- Fernando Perez (@fperez_org; http://fperez.org) fperez.net-at-gmail: mailing lists only (I ignore this when swamped!) fernando.perez-at-berkeley: contact me here for any direct mail -------------- next part -------------- An HTML attachment was scrubbed... URL: From carl.input at gmail.com Sun Jul 10 19:11:32 2016 From: carl.input at gmail.com (Carl Smith) Date: Mon, 11 Jul 2016 00:11:32 +0100 Subject: [IPython-dev] [IPython 5] [Docs] Custom Terminal Prompts In-Reply-To: References: Message-ID: No problem at all, Fernando. I did have a go at it based on the code Thomas pointed to, but couldn't figure out how to use the reference to `self.shell.execution_count`. When it's used directly, as it is in the IPython source (passed through `str`), you end up with something like this: In []: Using the `default_value` and `default_value_repr` methods, gives you the number, but it was always `1`, no matter what the actual input number was. I'll have another go at it soon, and am happy to add something to the docs once I figure it out, but just switched to using tmux and the ne editor this week too, so have a ton of little things to figure out and configure at the moment. Best, -- Carl Smith carl.input at gmail.com On 11 July 2016 at 00:01, Fernando Perez wrote: > BTW, Carl, if you come up with a nice example that works for you, a small > PR contribution to the docs would be greatly appreciated, so it helps > others in the future! > > Cheers > > f > > On Sat, Jul 9, 2016 at 12:30 PM, Carl Smith wrote: > >> Thanks Thomas. Appreciated. >> >> On Sat, 9 Jul 2016 17:07 Thomas Kluyver, wrote: >> >>> On 9 July 2016 at 15:59, Carl Smith wrote: >>> >>>> Just been trying to set up a custom prompt with the new prompt_toolkit >>>> features, and couldn't figure it out from the IPython docs. Perhaps adding >>>> an example class would make things clear. >>> >>> >>> In the absence of examples in the docs, the prompt classes in the code >>> might be worth a look: >>> >>> >>> https://github.com/ipython/ipython/blob/master/IPython/terminal/prompts.py >>> _______________________________________________ >>> IPython-dev mailing list >>> IPython-dev at scipy.org >>> https://mail.scipy.org/mailman/listinfo/ipython-dev >>> >> >> _______________________________________________ >> IPython-dev mailing list >> IPython-dev at scipy.org >> https://mail.scipy.org/mailman/listinfo/ipython-dev >> >> > > > -- > Fernando Perez (@fperez_org; http://fperez.org) > fperez.net-at-gmail: mailing lists only (I ignore this when swamped!) > fernando.perez-at-berkeley: contact me here for any direct mail > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > https://mail.scipy.org/mailman/listinfo/ipython-dev > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From fperez.net at gmail.com Sun Jul 10 19:15:38 2016 From: fperez.net at gmail.com (Fernando Perez) Date: Sun, 10 Jul 2016 16:15:38 -0700 Subject: [IPython-dev] [IPython 5] [Docs] Custom Terminal Prompts In-Reply-To: References: Message-ID: On Sun, Jul 10, 2016 at 4:11 PM, Carl Smith wrote: > No problem at all, Fernando. > Great, thanks! > I did have a go at it based on the code Thomas pointed to, but couldn't > figure out how to use the reference to `self.shell.execution_count`. When > it's used directly, as it is in the IPython source (passed through `str`), > you end up with something like this: > > In []: > > Using the `default_value` and `default_value_repr` methods, gives you the > number, but it was always `1`, no matter what the actual input number was. > Mmh, I'm afraid I haven't really done any significant prompt customizations in years, way before we made the system traitlets-based... I don't have a quick solution handy. But let's see if someone else can pitch in and we get a solution, otherwise I'll try to dig in later... -- Fernando Perez (@fperez_org; http://fperez.org) fperez.net-at-gmail: mailing lists only (I ignore this when swamped!) fernando.perez-at-berkeley: contact me here for any direct mail -------------- next part -------------- An HTML attachment was scrubbed... URL: From carl.input at gmail.com Sun Jul 10 19:20:03 2016 From: carl.input at gmail.com (Carl Smith) Date: Mon, 11 Jul 2016 00:20:03 +0100 Subject: [IPython-dev] [IPython 5] [Docs] Custom Terminal Prompts In-Reply-To: References: Message-ID: Thanks Fernando, but please don't put yourself out on my account. Obviously, it's something that needs figuring out, but there's no urgency here. Best, -- Carl Smith carl.input at gmail.com On 11 July 2016 at 00:15, Fernando Perez wrote: > On Sun, Jul 10, 2016 at 4:11 PM, Carl Smith wrote: > >> No problem at all, Fernando. >> > > Great, thanks! > > >> I did have a go at it based on the code Thomas pointed to, but couldn't >> figure out how to use the reference to `self.shell.execution_count`. When >> it's used directly, as it is in the IPython source (passed through `str`), >> you end up with something like this: >> >> In []: >> >> Using the `default_value` and `default_value_repr` methods, gives you the >> number, but it was always `1`, no matter what the actual input number was. >> > > Mmh, I'm afraid I haven't really done any significant prompt > customizations in years, way before we made the system traitlets-based... I > don't have a quick solution handy. But let's see if someone else can pitch > in and we get a solution, otherwise I'll try to dig in later... > > -- > Fernando Perez (@fperez_org; http://fperez.org) > fperez.net-at-gmail: mailing lists only (I ignore this when swamped!) > fernando.perez-at-berkeley: contact me here for any direct mail > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > https://mail.scipy.org/mailman/listinfo/ipython-dev > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From carl.input at gmail.com Sun Jul 10 21:27:52 2016 From: carl.input at gmail.com (Carl Smith) Date: Mon, 11 Jul 2016 02:27:52 +0100 Subject: [IPython-dev] [IPython 5] [Docs] Custom Terminal Prompts In-Reply-To: References: Message-ID: Just to help move things along, this is what I have. It works, except for the input number always being `1`. I don't know much about some of the parts, so have no idea why the count doesn't increment. import IPython from pygments.token import Token Prompts = IPython.terminal.prompts.Prompts Shell = IPython.terminal.interactiveshell.TerminalInteractiveShell class CustomPrompts(Prompts): def in_prompt_tokens(self, cli=None): return [ (Token.Prompt, "CustomIn["), (Token.PromptNum, str(self.shell.execution_count)), (Token.Prompt, "]: ") ] get_ipython().prompts = CustomPrompts(Shell()) This code creates an input prompt like `CustomIn[1]: `, but the number is always `1`. Interestingly, the output prompt, which is inherited unmodified, is also stuck at `1` now. Everything works correctly; you can input code and so on, but the execution count never updates. If anyone has any ideas... Best, -- Carl Smith carl.input at gmail.com On 11 July 2016 at 00:20, Carl Smith wrote: > Thanks Fernando, but please don't put yourself out on my account. > Obviously, it's something that needs figuring out, but there's no urgency > here. > > Best, > > -- Carl Smith > carl.input at gmail.com > > On 11 July 2016 at 00:15, Fernando Perez wrote: > >> On Sun, Jul 10, 2016 at 4:11 PM, Carl Smith wrote: >> >>> No problem at all, Fernando. >>> >> >> Great, thanks! >> >> >>> I did have a go at it based on the code Thomas pointed to, but couldn't >>> figure out how to use the reference to `self.shell.execution_count`. When >>> it's used directly, as it is in the IPython source (passed through `str`), >>> you end up with something like this: >>> >>> In []: >>> >>> Using the `default_value` and `default_value_repr` methods, gives you >>> the number, but it was always `1`, no matter what the actual input number >>> was. >>> >> >> Mmh, I'm afraid I haven't really done any significant prompt >> customizations in years, way before we made the system traitlets-based... I >> don't have a quick solution handy. But let's see if someone else can pitch >> in and we get a solution, otherwise I'll try to dig in later... >> >> -- >> Fernando Perez (@fperez_org; http://fperez.org) >> fperez.net-at-gmail: mailing lists only (I ignore this when swamped!) >> fernando.perez-at-berkeley: contact me here for any direct mail >> >> _______________________________________________ >> IPython-dev mailing list >> IPython-dev at scipy.org >> https://mail.scipy.org/mailman/listinfo/ipython-dev >> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From carl.input at gmail.com Sun Jul 10 22:04:45 2016 From: carl.input at gmail.com (Carl Smith) Date: Mon, 11 Jul 2016 03:04:45 +0100 Subject: [IPython-dev] [IPython 5] [Docs] Custom Terminal Prompts In-Reply-To: References: Message-ID: It seems to be unrelated to the prompt customisation stuff. I removed the code from my last email, so now have the standard prompt again, but the execution count still fails to update, even though the prompt is working properly: ? ? In [*1*]: *import* IPython ? ? In [*2*]: Shell = IPython.terminal.interactiveshell.TerminalInteractiveShell ? ? In [*3*]: shell = Shell() ? ? In [*4*]: shell.execution_count ? ? Out[*4*]: 1 ? ? In [*5*]: shell.execution_count Out[*5*]: 1 Maybe the prompt class is supposed to increment the count whenever the ` in_prompt_tokens` method is called, but I need to get to bed. It's 3am here. G'night, -- Carl Smith carl.input at gmail.com On 11 July 2016 at 02:27, Carl Smith wrote: > Just to help move things along, this is what I have. It works, except for > the input number always being `1`. I don't know much about some of the > parts, so have no idea why the count doesn't increment. > > import IPython > from pygments.token import Token > > Prompts = IPython.terminal.prompts.Prompts > Shell = IPython.terminal.interactiveshell.TerminalInteractiveShell > > class CustomPrompts(Prompts): > > def in_prompt_tokens(self, cli=None): return [ > (Token.Prompt, "CustomIn["), > (Token.PromptNum, str(self.shell.execution_count)), > (Token.Prompt, "]: ") > ] > > get_ipython().prompts = CustomPrompts(Shell()) > > This code creates an input prompt like `CustomIn[1]: `, but the number is > always `1`. Interestingly, the output prompt, which is inherited > unmodified, is also stuck at `1` now. Everything works correctly; you can > input code and so on, but the execution count never updates. > > If anyone has any ideas... > > Best, > > -- Carl Smith > carl.input at gmail.com > > On 11 July 2016 at 00:20, Carl Smith wrote: > >> Thanks Fernando, but please don't put yourself out on my account. >> Obviously, it's something that needs figuring out, but there's no urgency >> here. >> >> Best, >> >> -- Carl Smith >> carl.input at gmail.com >> >> On 11 July 2016 at 00:15, Fernando Perez wrote: >> >>> On Sun, Jul 10, 2016 at 4:11 PM, Carl Smith >>> wrote: >>> >>>> No problem at all, Fernando. >>>> >>> >>> Great, thanks! >>> >>> >>>> I did have a go at it based on the code Thomas pointed to, but couldn't >>>> figure out how to use the reference to `self.shell.execution_count`. When >>>> it's used directly, as it is in the IPython source (passed through `str`), >>>> you end up with something like this: >>>> >>>> In []: >>>> >>>> Using the `default_value` and `default_value_repr` methods, gives you >>>> the number, but it was always `1`, no matter what the actual input number >>>> was. >>>> >>> >>> Mmh, I'm afraid I haven't really done any significant prompt >>> customizations in years, way before we made the system traitlets-based... I >>> don't have a quick solution handy. But let's see if someone else can pitch >>> in and we get a solution, otherwise I'll try to dig in later... >>> >>> -- >>> Fernando Perez (@fperez_org; http://fperez.org) >>> fperez.net-at-gmail: mailing lists only (I ignore this when swamped!) >>> fernando.perez-at-berkeley: contact me here for any direct mail >>> >>> _______________________________________________ >>> IPython-dev mailing list >>> IPython-dev at scipy.org >>> https://mail.scipy.org/mailman/listinfo/ipython-dev >>> >>> >> > -------------- next part -------------- An HTML attachment was scrubbed... URL: From bussonniermatthias at gmail.com Mon Jul 11 00:25:06 2016 From: bussonniermatthias at gmail.com (Matthias Bussonnier) Date: Sun, 10 Jul 2016 21:25:06 -0700 Subject: [IPython-dev] [IPython 5] [Docs] Custom Terminal Prompts In-Reply-To: References: Message-ID: https://github.com/asmeurer/iterm2-tools. Might be a good resource if you looks at (unfinished) PR. This week is SciPy, so I'll be low bandwidth, but if you issue a draft example PR, I can an try to review. -- M On Jul 10, 2016 19:04, "Carl Smith" wrote: > It seems to be unrelated to the prompt customisation stuff. I removed the > code from my last email, so now have the standard prompt again, but the > execution count still fails to update, even though the prompt is working > properly: > > ? ? > In [*1*]: *import* IPython > > ? ? > In [*2*]: Shell = > IPython.terminal.interactiveshell.TerminalInteractiveShell > > ? ? > In [*3*]: shell = Shell() > > ? ? > In [*4*]: shell.execution_count > > ? ? > Out[*4*]: 1 > > ? ? > In [*5*]: shell.execution_count > > Out[*5*]: 1 > > Maybe the prompt class is supposed to increment the count whenever the ` > in_prompt_tokens` method is called, but I need to get to bed. It's 3am > here. > > G'night, > > -- Carl Smith > carl.input at gmail.com > > On 11 July 2016 at 02:27, Carl Smith wrote: > >> Just to help move things along, this is what I have. It works, except for >> the input number always being `1`. I don't know much about some of the >> parts, so have no idea why the count doesn't increment. >> >> import IPython >> from pygments.token import Token >> >> Prompts = IPython.terminal.prompts.Prompts >> Shell = IPython.terminal.interactiveshell.TerminalInteractiveShell >> >> class CustomPrompts(Prompts): >> >> def in_prompt_tokens(self, cli=None): return [ >> (Token.Prompt, "CustomIn["), >> (Token.PromptNum, str(self.shell.execution_count)), >> (Token.Prompt, "]: ") >> ] >> >> get_ipython().prompts = CustomPrompts(Shell()) >> >> This code creates an input prompt like `CustomIn[1]: `, but the number is >> always `1`. Interestingly, the output prompt, which is inherited >> unmodified, is also stuck at `1` now. Everything works correctly; you can >> input code and so on, but the execution count never updates. >> >> If anyone has any ideas... >> >> Best, >> >> -- Carl Smith >> carl.input at gmail.com >> >> On 11 July 2016 at 00:20, Carl Smith wrote: >> >>> Thanks Fernando, but please don't put yourself out on my account. >>> Obviously, it's something that needs figuring out, but there's no urgency >>> here. >>> >>> Best, >>> >>> -- Carl Smith >>> carl.input at gmail.com >>> >>> On 11 July 2016 at 00:15, Fernando Perez wrote: >>> >>>> On Sun, Jul 10, 2016 at 4:11 PM, Carl Smith >>>> wrote: >>>> >>>>> No problem at all, Fernando. >>>>> >>>> >>>> Great, thanks! >>>> >>>> >>>>> I did have a go at it based on the code Thomas pointed to, but >>>>> couldn't figure out how to use the reference to >>>>> `self.shell.execution_count`. When it's used directly, as it is in the >>>>> IPython source (passed through `str`), you end up with something like this: >>>>> >>>>> In []: >>>>> >>>>> Using the `default_value` and `default_value_repr` methods, gives you >>>>> the number, but it was always `1`, no matter what the actual input number >>>>> was. >>>>> >>>> >>>> Mmh, I'm afraid I haven't really done any significant prompt >>>> customizations in years, way before we made the system traitlets-based... I >>>> don't have a quick solution handy. But let's see if someone else can pitch >>>> in and we get a solution, otherwise I'll try to dig in later... >>>> >>>> -- >>>> Fernando Perez (@fperez_org; http://fperez.org) >>>> fperez.net-at-gmail: mailing lists only (I ignore this when swamped!) >>>> fernando.perez-at-berkeley: contact me here for any direct mail >>>> >>>> _______________________________________________ >>>> IPython-dev mailing list >>>> IPython-dev at scipy.org >>>> https://mail.scipy.org/mailman/listinfo/ipython-dev >>>> >>>> >>> >> > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > https://mail.scipy.org/mailman/listinfo/ipython-dev > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From takowl at gmail.com Mon Jul 11 08:00:43 2016 From: takowl at gmail.com (Thomas Kluyver) Date: Mon, 11 Jul 2016 13:00:43 +0100 Subject: [IPython-dev] [IPython 5] [Docs] Custom Terminal Prompts In-Reply-To: References: Message-ID: On 11 July 2016 at 02:27, Carl Smith wrote: > get_ipython().prompts = CustomPrompts(Shell()) > Don't instantiate a new shell - the value you get from get_ipython() is the active shell. So do this: ip = get_ipython() ip.prompts = CustomPrompts(ip) -------------- next part -------------- An HTML attachment was scrubbed... URL: From carl.input at gmail.com Mon Jul 11 16:12:19 2016 From: carl.input at gmail.com (Carl Smith) Date: Mon, 11 Jul 2016 20:12:19 +0000 Subject: [IPython-dev] [IPython 5] [Docs] Custom Terminal Prompts In-Reply-To: References: Message-ID: I think the problem stems from what Thomas said: There's one shell executing code, and another just sat around doing nothing. It's the later one that the CustomPrompt class has a reference to. On the PR, should I put the example code right there in the docs, where the API is explained, or is there a wiki or something? Happy either way. Just unsure what's correct these days. Cheers, On Mon, 11 Jul 2016 13:01 Thomas Kluyver, wrote: > On 11 July 2016 at 02:27, Carl Smith wrote: > >> get_ipython().prompts = CustomPrompts(Shell()) >> > > Don't instantiate a new shell - the value you get from get_ipython() is > the active shell. So do this: > > ip = get_ipython() > ip.prompts = CustomPrompts(ip) > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > https://mail.scipy.org/mailman/listinfo/ipython-dev > -------------- next part -------------- An HTML attachment was scrubbed... URL: From fperez.net at gmail.com Mon Jul 11 16:17:43 2016 From: fperez.net at gmail.com (Fernando Perez) Date: Mon, 11 Jul 2016 13:17:43 -0700 Subject: [IPython-dev] [IPython 5] [Docs] Custom Terminal Prompts In-Reply-To: References: Message-ID: On Mon, Jul 11, 2016 at 1:12 PM, Carl Smith wrote: > On the PR, should I put the example code right there in the docs, where > the API is explained, or is there a wiki or something? Happy either way. > Just unsure what's correct these days. > > Best to put it in the docs themselves... Wikis tend to go stale more easily without active curation, and ours is no exception :) -- Fernando Perez (@fperez_org; http://fperez.org) fperez.net-at-gmail: mailing lists only (I ignore this when swamped!) fernando.perez-at-berkeley: contact me here for any direct mail -------------- next part -------------- An HTML attachment was scrubbed... URL: From takowl at gmail.com Mon Jul 11 16:20:10 2016 From: takowl at gmail.com (Thomas Kluyver) Date: Mon, 11 Jul 2016 21:20:10 +0100 Subject: [IPython-dev] [IPython 5] [Docs] Custom Terminal Prompts In-Reply-To: References: Message-ID: On 11 July 2016 at 21:12, Carl Smith wrote: > On the PR, should I put the example code right there in the docs, where > the API is explained, or is there a wiki or something? Happy either way. > Just unsure what's correct these days. In the docs themselves would be great - thanks! -------------- next part -------------- An HTML attachment was scrubbed... URL: From carl.input at gmail.com Tue Jul 12 20:34:39 2016 From: carl.input at gmail.com (Carl Smith) Date: Wed, 13 Jul 2016 01:34:39 +0100 Subject: [IPython-dev] [IPython 5] [Docs] Custom Terminal Prompts In-Reply-To: References: Message-ID: It's working now. Thanks for your help with that. It was what Thomas said. Looking through the IPython repo, it turns out there's already a commit that added a couple of examples of how to do this, so maybe just need to move some existing stuff around. If I'd found those examples, and the link Thomas suggested (to the default class definition), it would have been easy to figure out from there. The commit that adds the examples: https://github.com/ipython/ipython/commit/95ed0855ae23e55c10b46903db911265aa1cdd58#diff-c5d5abe11d1c298906cb121c45eb12e2 I did put a simple example together before I saw those, and you're welcome to use it too. It just creates more minimal versions of the standard prompts to save some space: [*1*]* $ def* *inc*(x): *$* *return* x + 1 *$* [*2*] *$* inc 1 *---->* inc(1) [*2] :* 2 The code is pretty compact too: *from IPython.terminal.prompts import Prompts, Token* *class CustomPrompts(Prompts):* * def in_prompt_tokens(self, cli=None): return [* * (Token.Prompt, "["),* * (Token.PromptNum, str(self.shell.execution_count)),* * (Token.Prompt, "] $ ")* * ]* * def out_prompt_tokens(self): return [* * (Token.OutPrompt, "["),* * (Token.OutPromptNum, str(self.shell.execution_count)),* * (Token.OutPrompt, "] : ")* * ]* * def continuation_prompt_tokens(self, cli=None, width=None):* * if width is None: width = self._width()* * return [(Token.Prompt, " " * (width - 5) + " $ ")]* *ip = get_ipython()* *ip.prompts = CustomPrompts(ip)* One thing I found buggy was the rewrite prompt. If you inherit from `Prompt` and redefine some of the prompt methods in the derived class, as you're meant to do, any prompts that you inherit from `Prompt` will pad themselves out to keep everything aligned. This works well except when you have a multiline prompt. Prompts can get pretty lengthy, and you don't really want multiline inputs starting at column 50, so two-line prompts with a really short second line will be fairly common. If you create a multiline Input prompt, the rewrite prompt will end up being too long. The math in the token assumes the Input prompt is all on one line. def rewrite_prompt_tokens(self): width = self._width() return [ (Token.Prompt, ('-' * (width - 2)) + '> '), ] I'm happy to do some work on the docs, but not sure what should be done exactly. It's getting late here again (1:30am), so it'll have to be tomorrow now anyway. Best, -- Carl Smith carl.input at gmail.com On 11 July 2016 at 21:20, Thomas Kluyver wrote: > On 11 July 2016 at 21:12, Carl Smith wrote: > >> On the PR, should I put the example code right there in the docs, where >> the API is explained, or is there a wiki or something? Happy either way. >> Just unsure what's correct these days. > > > In the docs themselves would be great - thanks! > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > https://mail.scipy.org/mailman/listinfo/ipython-dev > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From achi at hush.ai Wed Jul 13 01:33:14 2016 From: achi at hush.ai (Yuri Numerov) Date: Wed, 13 Jul 2016 07:33:14 +0200 Subject: [IPython-dev] [IPython 5] [Docs] Custom Terminal Prompts In-Reply-To: References: Message-ID: <20160713053314.EDE9BE0372@smtp.hushmail.com> Thanks a ton for this Carl, I spent some time trying to figure this out myself when ipython 5 came out without luck :) On 13/07/2016 at 2:34 AM, "Carl Smith" wrote: > >It's working now. Thanks for your help with that. It was what >Thomas said. > >Looking through the IPython repo, it turns out there's already a >commit >that added a couple of examples of how to do this, so maybe just >need to >move some existing stuff around. If I'd found those examples, and >the link >Thomas suggested (to the default class definition), it would have >been easy >to figure out from there. > >The commit that adds the examples: >https://github.com/ipython/ipython/commit/95ed0855ae23e55c10b46903d >b911265aa1cdd58#diff-c5d5abe11d1c298906cb121c45eb12e2 > >I did put a simple example together before I saw those, and you're >welcome >to use it too. It just creates more minimal versions of the >standard >prompts to save some space: > >[*1*]* $ def* *inc*(x): > *$* *return* x + 1 > *$* > > >[*2*] *$* inc 1 >*---->* inc(1) >[*2] :* 2 > >The code is pretty compact too: > >*from IPython.terminal.prompts import Prompts, Token* > >*class CustomPrompts(Prompts):* > >* def in_prompt_tokens(self, cli=None): return [* >* (Token.Prompt, "["),* >* (Token.PromptNum, str(self.shell.execution_count)),* >* (Token.Prompt, "] $ ")* >* ]* > >* def out_prompt_tokens(self): return [* >* (Token.OutPrompt, "["),* >* (Token.OutPromptNum, str(self.shell.execution_count)),* >* (Token.OutPrompt, "] : ")* >* ]* > >* def continuation_prompt_tokens(self, cli=None, width=None):* >* if width is None: width = self._width()* >* return [(Token.Prompt, " " * (width - 5) + " $ ")]* > >*ip = get_ipython()* >*ip.prompts = CustomPrompts(ip)* > >One thing I found buggy was the rewrite prompt. If you inherit from >`Prompt` and redefine some of the prompt methods in the derived >class, as >you're meant to do, any prompts that you inherit from `Prompt` >will pad >themselves out to keep everything aligned. This works well except >when you >have a multiline prompt. > >Prompts can get pretty lengthy, and you don't really want >multiline inputs >starting at column 50, so two-line prompts with a really short >second line >will be fairly common. > >If you create a multiline Input prompt, the rewrite prompt will >end up >being too long. The math in the token assumes the Input prompt is >all on >one line. > >def rewrite_prompt_tokens(self): width = self._width() return [ >(Token.Prompt, ('-' * (width - 2)) + '> '), ] > >I'm happy to do some work on the docs, but not sure what should be >done >exactly. It's getting late here again (1:30am), so it'll have to be >tomorrow now anyway. > >Best, > > >-- Carl Smith >carl.input at gmail.com > >On 11 July 2016 at 21:20, Thomas Kluyver wrote: > >> On 11 July 2016 at 21:12, Carl Smith >wrote: >> >>> On the PR, should I put the example code right there in the >docs, where >>> the API is explained, or is there a wiki or something? Happy >either way. >>> Just unsure what's correct these days. >> >> >> In the docs themselves would be great - thanks! >> >> _______________________________________________ >> IPython-dev mailing list >> IPython-dev at scipy.org >> https://mail.scipy.org/mailman/listinfo/ipython-dev >> >> From takowl at gmail.com Wed Jul 13 06:38:10 2016 From: takowl at gmail.com (Thomas Kluyver) Date: Wed, 13 Jul 2016 11:38:10 +0100 Subject: [IPython-dev] [IPython 5] [Docs] Custom Terminal Prompts In-Reply-To: References: Message-ID: Thanks Carl! On 13 July 2016 at 01:34, Carl Smith wrote: > The commit that adds the examples: > > https://github.com/ipython/ipython/commit/95ed0855ae23e55c10b46903db911265aa1cdd58#diff-c5d5abe11d1c298906cb121c45eb12e2 > Sigh, of course we have docs on customising prompts in two places. I'll try to unify them... > One thing I found buggy was the rewrite prompt. If you inherit from > `Prompt` and redefine some of the prompt methods in the derived class, as > you're meant to do, any prompts that you inherit from `Prompt` will pad > themselves out to keep everything aligned. This works well except when you > have a multiline prompt. > Yes, I think the prompt is conceptually a single line. Does the information in the lines above where you type need to change while you're typing? If not, I'd recommend printing it before the prompt is displayed with the post_run_cell event ( http://ipython.readthedocs.io/en/stable/config/callbacks.html). Thomas -------------- next part -------------- An HTML attachment was scrubbed... URL: From carl.input at gmail.com Wed Jul 13 12:44:18 2016 From: carl.input at gmail.com (Carl Smith) Date: Wed, 13 Jul 2016 17:44:18 +0100 Subject: [IPython-dev] [IPython 5] [Docs] Custom Terminal Prompts In-Reply-To: References: Message-ID: No problem, Yuri - mostly just followed Thomas' pointers. Thanks again, Thomas. Yep - printing the first line of the prompt from a callback should work fine. I didn't think about the event API. The current API for defining custom prompts is powerful, but pretty low level, and it becomes more complicated if you need custom token classes to use different colours. It'd be nice if there was also a wrapper API that would take strings, like bash prompts, and parse them into prompt_toolkit token arrays and plumb them in automatically. The actual format used in bash prompts makes it awkward to define styles, so I was thinking about reusing Python's string formatting mini-language, and just defining a standard signature that will pass a bunch of helpful stuff to `format` when the prompt is compiled. No promises, but I'm going to play around with the new prompt API a bit more and see if there's a light way to wrap the current API. Cheers, -- Carl Smith carl.input at gmail.com On 13 July 2016 at 11:38, Thomas Kluyver wrote: > Thanks Carl! > > On 13 July 2016 at 01:34, Carl Smith wrote: > >> The commit that adds the examples: >> >> https://github.com/ipython/ipython/commit/95ed0855ae23e55c10b46903db911265aa1cdd58#diff-c5d5abe11d1c298906cb121c45eb12e2 >> > > Sigh, of course we have docs on customising prompts in two places. I'll > try to unify them... > > >> One thing I found buggy was the rewrite prompt. If you inherit from >> `Prompt` and redefine some of the prompt methods in the derived class, as >> you're meant to do, any prompts that you inherit from `Prompt` will pad >> themselves out to keep everything aligned. This works well except when you >> have a multiline prompt. >> > > Yes, I think the prompt is conceptually a single line. Does the > information in the lines above where you type need to change while you're > typing? If not, I'd recommend printing it before the prompt is displayed > with the post_run_cell event ( > http://ipython.readthedocs.io/en/stable/config/callbacks.html). > > Thomas > > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > https://mail.scipy.org/mailman/listinfo/ipython-dev > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From fperez.net at gmail.com Wed Jul 13 14:45:07 2016 From: fperez.net at gmail.com (Fernando Perez) Date: Wed, 13 Jul 2016 11:45:07 -0700 Subject: [IPython-dev] [IPython 5] [Docs] Custom Terminal Prompts In-Reply-To: References: Message-ID: On Wed, Jul 13, 2016 at 3:38 AM, Thomas Kluyver wrote: > Yes, I think the prompt is conceptually a single line. Does the > information in the lines above where you type need to change while you're > typing? If not, I'd recommend printing it before the prompt is displayed > with the post_run_cell event ( > http://ipython.readthedocs.io/en/stable/config/callbacks.html). > Mmh, should we update the rewrite logic to basically work only on the last line of the prompt? It could compute the length to write on prompt_string. split('\n')[-1] rather than the full prompt_string. It seems to me that would give us the correct logic in all cases (including single line prompts), no? -- Fernando Perez (@fperez_org; http://fperez.org) fperez.net-at-gmail: mailing lists only (I ignore this when swamped!) fernando.perez-at-berkeley: contact me here for any direct mail -------------- next part -------------- An HTML attachment was scrubbed... URL: From carl.input at gmail.com Wed Jul 13 16:04:39 2016 From: carl.input at gmail.com (Carl Smith) Date: Wed, 13 Jul 2016 21:04:39 +0100 Subject: [IPython-dev] [IPython 5] [Docs] Custom Terminal Prompts In-Reply-To: References: Message-ID: On 13 July 2016 at 19:45, Fernando Perez wrote: > > On Wed, Jul 13, 2016 at 3:38 AM, Thomas Kluyver wrote: > >> Yes, I think the prompt is conceptually a single line. Does the >> information in the lines above where you type need to change while you're >> typing? If not, I'd recommend printing it before the prompt is displayed >> with the post_run_cell event ( >> http://ipython.readthedocs.io/en/stable/config/callbacks.html). >> > > Mmh, should we update the rewrite logic to basically work only on the last > line of the prompt? It could compute the length to write on prompt_string. > split('\n')[-1] rather than the full prompt_string. It seems to me that > would give us the correct logic in all cases (including single line > prompts), no? > ?+1 Yep. Basically, it's always going to be last line you want to align to, whether there's one or more. Obviously, users should be able to just define their prompt using the API, instead of defining half the prompt as a print call that happens once per input on a callback, and the other half as an arrays of tokens that are generated by a method every time you edit the input. Not many people will need this functionality, but it should work correctly if they ever do. -- Carl Smith carl.input at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From carl.input at gmail.com Wed Jul 13 16:07:55 2016 From: carl.input at gmail.com (Carl Smith) Date: Wed, 13 Jul 2016 21:07:55 +0100 Subject: [IPython-dev] [IPython 5] [Docs] Custom Terminal Prompts In-Reply-To: References: Message-ID: On 13 July 2016 at 21:04, Carl Smith wrote: > > Not many people will need this functionality, but it should work correctly > if they ever do. > ?I meant that not many people will need a multiline prompt that updates while they edit their input. There will probably be significant minority of users ?that will want a multiline prompt at some point. -- Carl Smith carl.input at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From klonuo at gmail.com Fri Jul 15 02:22:51 2016 From: klonuo at gmail.com (klo uo) Date: Fri, 15 Jul 2016 08:22:51 +0200 Subject: [IPython-dev] Where does IPython look for info when trying to connect to kernel Message-ID: I start kernel: ======================================== > ipython kernel NOTE: When using the `ipython kernel` entry point, Ctrl-C will not work. To exit, you will have to explicitly quit this process, by either sending "quit" from a client, or using Ctrl-\ in UNIX-like environments. To read more about this, see https://github.com/ipython/ipython/issues/2049 To connect another client to this kernel, use: --existing kernel-10128.json ======================================== Where is "kernel-10128.json" located? I dont see it in ~/.ipython/profile_default/security nor anywhere in ~/ipython subfolders nor in temp location. If I try with `ipython console --existing` I connect successfully, but not from IPython instance that I point to custom path with IPYTHONDIR env (path that kernel instance is using). If last sentence is confusing, ignore it, I'm just interested where is this file located? -------------- next part -------------- An HTML attachment was scrubbed... URL: From takowl at gmail.com Fri Jul 15 07:38:39 2016 From: takowl at gmail.com (Thomas Kluyver) Date: Fri, 15 Jul 2016 12:38:39 +0100 Subject: [IPython-dev] Where does IPython look for info when trying to connect to kernel In-Reply-To: References: Message-ID: On 15 July 2016 at 07:22, klo uo wrote: > Where is "kernel-10128.json" located? > > I dont see it in ~/.ipython/profile_default/security nor anywhere in > ~/ipython subfolders nor in temp location. > Sorry for the confusion. When IPython and Jupyter split, the general idea of kernels and connection files went to Jupyter. IPython provides a specific Jupyter kernel for running Python code. You can see where connection files live on your platform by running: jupyter --runtime-dir -------------- next part -------------- An HTML attachment was scrubbed... URL: From klonuo at gmail.com Fri Jul 15 08:07:33 2016 From: klonuo at gmail.com (klo uo) Date: Fri, 15 Jul 2016 14:07:33 +0200 Subject: [IPython-dev] Where does IPython look for info when trying to connect to kernel In-Reply-To: References: Message-ID: Thanks Thomas So on my Windows default location is "%appdata%\jupyter\runtime" Do you perhaps know if jupyter accepts custom default location, as it was with IPYTHONDIR for ipython, or should I ask on jupyter list? On Fri, Jul 15, 2016 at 1:38 PM, Thomas Kluyver wrote: > On 15 July 2016 at 07:22, klo uo wrote: > >> Where is "kernel-10128.json" located? >> >> I dont see it in ~/.ipython/profile_default/security nor anywhere in >> ~/ipython subfolders nor in temp location. >> > > Sorry for the confusion. When IPython and Jupyter split, the general idea > of kernels and connection files went to Jupyter. IPython provides a > specific Jupyter kernel for running Python code. > > You can see where connection files live on your platform by running: > > jupyter --runtime-dir > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > https://mail.scipy.org/mailman/listinfo/ipython-dev > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From takowl at gmail.com Fri Jul 15 08:10:34 2016 From: takowl at gmail.com (Thomas Kluyver) Date: Fri, 15 Jul 2016 13:10:34 +0100 Subject: [IPython-dev] Where does IPython look for info when trying to connect to kernel In-Reply-To: References: Message-ID: On 15 July 2016 at 13:07, klo uo wrote: > Do you perhaps know if jupyter accepts custom default location, as it was > with IPYTHONDIR for ipython, or should I ask on jupyter list? Yes, there's a JUPYTER_RUNTIME_DIR environment variable. Docs here: http://jupyter.readthedocs.io/en/latest/projects/jupyter-directories.html#runtime-files -------------- next part -------------- An HTML attachment was scrubbed... URL: From thorin at broadinstitute.org Fri Jul 15 12:48:01 2016 From: thorin at broadinstitute.org (Thorin Tabor) Date: Fri, 15 Jul 2016 09:48:01 -0700 Subject: [IPython-dev] JupyterHub & TLS 1.2 Message-ID: I'm running JupyterHub through HTTPS and need to configure it to only use TLS 1.2. Is there a reasonable to do that? I noticed that Jupyter has an ssl_options config setting that's passed to the underlying tornado server, but thus far I haven't seen an equivalent in JupyterHub. Ideally I'd like to just be able to run ssl_options.setdefault('ssl_version', ssl.PROTOCOL_TLSv1_2) or something similar. Does a way to do this in JupyterHub exist? Thorin Tabor -------------- next part -------------- An HTML attachment was scrubbed... URL: From benjaminrk at gmail.com Fri Jul 15 18:16:15 2016 From: benjaminrk at gmail.com (MinRK) Date: Fri, 15 Jul 2016 17:16:15 -0500 Subject: [IPython-dev] JupyterHub & TLS 1.2 In-Reply-To: References: Message-ID: With a default deployment, it's actually the configurable-http-proxy that's out front, so Python SSL parameters don't help us. I don't think CHP exposes that option yet, but we can add it easily enough. -MinRK On Fri, Jul 15, 2016 at 11:48 AM, Thorin Tabor wrote: > I'm running JupyterHub through HTTPS and need to configure it to only use > TLS 1.2. Is there a reasonable to do that? > > I noticed that Jupyter has an ssl_options config setting that's passed to > the underlying tornado server, but thus far I haven't seen an equivalent in > JupyterHub. Ideally I'd like to just be able to run > > ssl_options.setdefault('ssl_version', ssl.PROTOCOL_TLSv1_2) > > > or something similar. Does a way to do this in JupyterHub exist? > > Thorin Tabor > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > https://mail.scipy.org/mailman/listinfo/ipython-dev > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From klonuo at gmail.com Sat Jul 16 01:14:01 2016 From: klonuo at gmail.com (klo uo) Date: Sat, 16 Jul 2016 07:14:01 +0200 Subject: [IPython-dev] Where does IPython look for info when trying to connect to kernel In-Reply-To: References: Message-ID: Nice :) After setting IPYTHONDIR and JUPYTER_RUNTIME_DIR in .bashrc on Windows 10 WSL Bash shell (https://en.wikipedia.org/wiki/Windows_Subsystem_for_Linux) to my system IPython/Jupyter, I can now share same settings for both and easily share IPython sessions between the two. On Fri, Jul 15, 2016 at 2:10 PM, Thomas Kluyver wrote: > On 15 July 2016 at 13:07, klo uo wrote: > >> Do you perhaps know if jupyter accepts custom default location, as it was >> with IPYTHONDIR for ipython, or should I ask on jupyter list? > > > Yes, there's a JUPYTER_RUNTIME_DIR environment variable. Docs here: > > http://jupyter.readthedocs.io/en/latest/projects/jupyter-directories.html#runtime-files > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > https://mail.scipy.org/mailman/listinfo/ipython-dev > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From cappy2112 at gmail.com Sat Jul 16 15:40:05 2016 From: cappy2112 at gmail.com (Tony Cappellini) Date: Sat, 16 Jul 2016 12:40:05 -0700 Subject: [IPython-dev] nbconvert not found Message-ID: OSX Mavericks, 10.9.5 I don't understand why condo shows nbconvert as being installed, yet cannot be executed. I've tried this in two virtual environments, both have the same problem. nbconvert -bash: *nbconvert: command not found* [py27dev] tonys-mbp:~ tonycappellini$ conda list nbconvert # packages in environment at /Users/tonycappellini/anaconda/envs/py27dev: # *nbconvert 4.1.0 py27_0* Have any of you seen this issue before? -------------- next part -------------- An HTML attachment was scrubbed... URL: From efiring at hawaii.edu Sat Jul 16 15:41:59 2016 From: efiring at hawaii.edu (Eric Firing) Date: Sat, 16 Jul 2016 09:41:59 -1000 Subject: [IPython-dev] nbconvert not found In-Reply-To: References: Message-ID: On 2016/07/16 9:40 AM, Tony Cappellini wrote: > > OSX Mavericks, 10.9.5 > > > I don't understand why condo shows nbconvert as being installed, yet > cannot be executed. > > I've tried this in two virtual environments, both have the same problem. > > nbconvert Try "jupyter nbconvert ...". Eric > -bash: *nbconvert: command not found* > [py27dev] tonys-mbp:~ tonycappellini$ conda list nbconvert > # packages in environment at /Users/tonycappellini/anaconda/envs/py27dev: > # > *nbconvert 4.1.0 py27_0* > * > * > > Have any of you seen this issue before? > > > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > https://mail.scipy.org/mailman/listinfo/ipython-dev > From carl.input at gmail.com Sun Jul 17 21:51:35 2016 From: carl.input at gmail.com (Carl Smith) Date: Mon, 18 Jul 2016 02:51:35 +0100 Subject: [IPython-dev] Making the cursor wrap around on the ends of lines. Message-ID: While looking for more info on PT keybinding, I came across some xonsh code which makes the cursor wrap around when you navigate off the start or end of a line, like most GUI editors do. The original code is here: http://xon.sh/_modules/xonsh/ptk/key_bindings.html There's an IPython startup file (as a gist) here that does the same thing for IPython 5: https://gist.github.com/carlsmith/3cb2340bbfbdfcbdd579a948717af997 It seems like something that should just be enabled at all times, but maybe someone else would prefer the current behaviour. Would anyone want this to be configurable? Cheers, -- Carl Smith carl.input at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From cappy2112 at gmail.com Sun Jul 17 23:57:11 2016 From: cappy2112 at gmail.com (Tony Cappellini) Date: Sun, 17 Jul 2016 20:57:11 -0700 Subject: [IPython-dev] nbconvert not found Message-ID: Message: 2 > Date: Sat, 16 Jul 2016 09:41:59 -1000 > From: Eric Firing > To: ipython-dev at scipy.org > Subject: Re: [IPython-dev] nbconvert not found > Message-ID: > Content-Type: text/plain; charset=windows-1252; format=flowed > > > > nbconvert > > >>Try "jupyter nbconvert ...". > > >>Eric > > Uggh. Old habits die hard. I'll make an alias so I don't forget again Thanks Eric -------------- next part -------------- An HTML attachment was scrubbed... URL: From takowl at gmail.com Mon Jul 18 06:01:31 2016 From: takowl at gmail.com (Thomas Kluyver) Date: Mon, 18 Jul 2016 11:01:31 +0100 Subject: [IPython-dev] Making the cursor wrap around on the ends of lines. In-Reply-To: References: Message-ID: Rather than duplicating this between xonsh and IPython, maybe we should try to push it upstream to prompt_toolkit? On 18 July 2016 at 02:51, Carl Smith wrote: > While looking for more info on PT keybinding, I came across some xonsh > code which makes the cursor wrap around when you navigate off the start or > end of a line, like most GUI editors do. The original code is here: > > http://xon.sh/_modules/xonsh/ptk/key_bindings.html > > There's an IPython startup file (as a gist) here that does the same thing > for IPython 5: > > https://gist.github.com/carlsmith/3cb2340bbfbdfcbdd579a948717af997 > > It seems like something that should just be enabled at all times, but > maybe someone else would prefer the current behaviour. Would anyone want > this to be configurable? > > Cheers, > > -- Carl Smith > carl.input at gmail.com > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > https://mail.scipy.org/mailman/listinfo/ipython-dev > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From carl.input at gmail.com Mon Jul 18 12:01:05 2016 From: carl.input at gmail.com (Carl Smith) Date: Mon, 18 Jul 2016 17:01:05 +0100 Subject: [IPython-dev] Making the cursor wrap around on the ends of lines. In-Reply-To: References: Message-ID: On 18 July 2016 at 11:01, Thomas Kluyver wrote: > Rather than duplicating this between xonsh and IPython, maybe we should > try to push it upstream to prompt_toolkit? > +1 Makes a lot of sense?. -- Carl Smith carl.input at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From fperez.net at gmail.com Mon Jul 18 14:03:48 2016 From: fperez.net at gmail.com (Fernando Perez) Date: Mon, 18 Jul 2016 11:03:48 -0700 Subject: [IPython-dev] Making the cursor wrap around on the ends of lines. In-Reply-To: References: Message-ID: On Mon, Jul 18, 2016 at 9:01 AM, Carl Smith wrote: > On 18 July 2016 at 11:01, Thomas Kluyver wrote: > >> Rather than duplicating this between xonsh and IPython, maybe we should >> try to push it upstream to prompt_toolkit? >> > > +1 Makes a lot of sense?. > Agreed. -- Fernando Perez (@fperez_org; http://fperez.org) fperez.net-at-gmail: mailing lists only (I ignore this when swamped!) fernando.perez-at-berkeley: contact me here for any direct mail -------------- next part -------------- An HTML attachment was scrubbed... URL: From carl.input at gmail.com Mon Jul 18 17:15:21 2016 From: carl.input at gmail.com (Carl Smith) Date: Mon, 18 Jul 2016 22:15:21 +0100 Subject: [IPython-dev] Using Prompt Toolkit to edit terminal inputs in a screen editor. Message-ID: Prompt Toolkit allows you to open the current input in your favourite editor, edit the code, and when you exit, you have the edited code in the input buffer. This is different to %edit, and is really useful in practice. If you chuck this code in a startup file, it will create a keybinding for the feature. This code uses Ctrl-N (because ne is currently my favourite tool for these kinds of edits), but you can easily change the keybinding. from prompt_toolkit.keys import Keys ip = get_ipython() def open_input_in_editor(event): event.cli.current_buffer.tempfile_suffix = ".py" event.cli.current_buffer.open_in_editor(event.cli) bind_key = ip.pt_cli.application.key_bindings_registry.add_binding bind_key(Keys.ControlN)(open_input_in_editor) It'd be nice to have a better way of setting the tempfile suffix, so it isn't redundantly reassigned every time you use the function, but doing it this way is fine for now. Removing that causes the tempfile to have no suffix, so you wouldn't get language specific features like syntax highlighting. Hope someone else finds this useful. Best, -- Carl Smith carl.input at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From takowl at gmail.com Tue Jul 19 07:10:31 2016 From: takowl at gmail.com (Thomas Kluyver) Date: Tue, 19 Jul 2016 12:10:31 +0100 Subject: [IPython-dev] Using Prompt Toolkit to edit terminal inputs in a screen editor. In-Reply-To: References: Message-ID: Ooh, nice find. If we can agree on a keyboard shortcut that people like for this, I'd like to enable it by default in IPython. On 18 July 2016 at 22:15, Carl Smith wrote: > Prompt Toolkit allows you to open the current input in your favourite > editor, edit the code, and when you exit, you have the edited code in the > input buffer. This is different to %edit, and is really useful in practice. > > If you chuck this code in a startup file, it will create a keybinding for > the feature. This code uses Ctrl-N (because ne is currently my favourite > tool for these kinds of edits), but you can easily change the keybinding. > > from prompt_toolkit.keys import Keys > > ip = get_ipython() > > def open_input_in_editor(event): > > event.cli.current_buffer.tempfile_suffix = ".py" > event.cli.current_buffer.open_in_editor(event.cli) > > bind_key = ip.pt_cli.application.key_bindings_registry.add_binding > bind_key(Keys.ControlN)(open_input_in_editor) > > It'd be nice to have a better way of setting the tempfile suffix, so it > isn't redundantly reassigned every time you use the function, but doing it > this way is fine for now. Removing that causes the tempfile to have no > suffix, so you wouldn't get language specific features like syntax > highlighting. > > Hope someone else finds this useful. > > Best, > -- Carl Smith > carl.input at gmail.com > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > https://mail.scipy.org/mailman/listinfo/ipython-dev > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From carl.input at gmail.com Tue Jul 19 12:28:52 2016 From: carl.input at gmail.com (Carl Smith) Date: Tue, 19 Jul 2016 17:28:52 +0100 Subject: [IPython-dev] Using Prompt Toolkit to edit terminal inputs in a screen editor. In-Reply-To: References: Message-ID: -- Carl Smith carl.input at gmail.com On 19 July 2016 at 12:10, Thomas Kluyver wrote: > Ooh, nice find. If we can agree on a keyboard shortcut that people like > for this, I'd like to enable it by default in IPython. > > On 18 July 2016 at 22:15, Carl Smith wrote: > >> Prompt Toolkit allows you to open the current input in your favourite >> editor, edit the code, and when you exit, you have the edited code in the >> input buffer. This is different to %edit, and is really useful in practice. >> >> If you chuck this code in a startup file, it will create a keybinding for >> the feature. This code uses Ctrl-N (because ne is currently my favourite >> tool for these kinds of edits), but you can easily change the keybinding. >> >> from prompt_toolkit.keys import Keys >> >> ip = get_ipython() >> >> def open_input_in_editor(event): >> >> event.cli.current_buffer.tempfile_suffix = ".py" >> event.cli.current_buffer.open_in_editor(event.cli) >> >> bind_key = ip.pt_cli.application.key_bindings_registry.add_binding >> bind_key(Keys.ControlN)(open_input_in_editor) >> >> It'd be nice to have a better way of setting the tempfile suffix, so it >> isn't redundantly reassigned every time you use the function, but doing it >> this way is fine for now. Removing that causes the tempfile to have no >> suffix, so you wouldn't get language specific features like syntax >> highlighting. >> >> Hope someone else finds this useful. >> >> Best, >> -- Carl Smith >> carl.input at gmail.com >> >> _______________________________________________ >> IPython-dev mailing list >> IPython-dev at scipy.org >> https://mail.scipy.org/mailman/listinfo/ipython-dev >> >> > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > https://mail.scipy.org/mailman/listinfo/ipython-dev > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From carl.input at gmail.com Tue Jul 19 12:58:54 2016 From: carl.input at gmail.com (Carl Smith) Date: Tue, 19 Jul 2016 17:58:54 +0100 Subject: [IPython-dev] Using Prompt Toolkit to edit terminal inputs in a screen editor. In-Reply-To: References: Message-ID: ?Sorry for sending a blank reply to the list earlier. GMail needs to move [Send] to the right-hand side. On 19 July 2016 at 12:10, Thomas Kluyver wrote: > Ooh, nice find. If we can agree on a keyboard shortcut that people like >> for this, I'd like to enable it by default in IPython. >> > ?Sweet. That would cool. Cheers Thomas. I found it a couple of days ago, and use it all the time. Prompt Toolkit is awesome. Once you get a reference to their PT cli instance (as `ip.pt_cli`, or the first arg to any prompt token method, or the `cli` attribute of any event) you can access the input buffer, set up keybindings and any stuff like that - basically, anywhere you're just playing with state and event handlers, you're generally ok. But. There are still a lot of cool options that are in the PT docs, that we can't access yet from IPython (as far as I tell). ? The documented APIs for the inaccessible PT features involve passing stuff to their `parse` method, using named args, but there's no obvious way to attach the same stuff to a running instance. Any ideas would be appreciated. As a concrete example, how would an IPython user add a bottom toolbar: http://python-prompt-toolkit.readthedocs.io/en/stable/pages/building_prompts.html#adding-a-bottom-toolbar Thanks, -- Carl Smith carl.input at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From takowl at gmail.com Tue Jul 19 13:01:17 2016 From: takowl at gmail.com (Thomas Kluyver) Date: Tue, 19 Jul 2016 18:01:17 +0100 Subject: [IPython-dev] Using Prompt Toolkit to edit terminal inputs in a screen editor. In-Reply-To: References: Message-ID: On 19 July 2016 at 17:58, Carl Smith wrote: > The documented APIs for the inaccessible PT features involve passing stuff > to their `parse` method, using named args, but there's no obvious way to > attach the same stuff to a running instance. Any ideas would be > appreciated. As a concrete example, how would an IPython user add a bottom > toolbar: > I think that's something we'd need to expose. I'm planning to investigate adding a bottom toolbar for IPython 6. -------------- next part -------------- An HTML attachment was scrubbed... URL: From carl.input at gmail.com Tue Jul 19 13:12:47 2016 From: carl.input at gmail.com (Carl Smith) Date: Tue, 19 Jul 2016 18:12:47 +0100 Subject: [IPython-dev] Using Prompt Toolkit to edit terminal inputs in a screen editor. In-Reply-To: References: Message-ID: On 19 July 2016 at 18:01, Thomas Kluyver wrote: > On 19 July 2016 at 17:58, Carl Smith wrote: > >> The documented APIs for the inaccessible PT features involve passing >> stuff to their `parse` method, using named args, but there's no obvious way >> to attach the same stuff to a running instance. Any ideas would be >> appreciated. As a concrete example, how would an IPython user add a bottom >> toolbar: >> > > I think that's something we'd need to expose. I'm planning to investigate > adding a bottom toolbar for IPython 6. > ?Cool. It'd be nice if there was a way to define some of this stuff on a running instance, instead of you guys having to push each feature by hand, but I'm just being impatient really. Each new feature will need properly integrating into IPython anyway. ?On keys for the editor feature, users can do `from prompt_toolkit.keys import Keys`?, then use stuff like `Keys.ControlV` easily. The PT API would make it pretty simple to take a user's Key subclass and set up their shortcut. I think only do it once per session though, like any event handler. ?Best, and thanks again Thomas. You do an awesome job with the Python community.? -------------- next part -------------- An HTML attachment was scrubbed... URL: From carl.input at gmail.com Tue Jul 19 13:29:14 2016 From: carl.input at gmail.com (Carl Smith) Date: Tue, 19 Jul 2016 18:29:14 +0100 Subject: [IPython-dev] Using Prompt Toolkit to edit terminal inputs in a screen editor. In-Reply-To: References: Message-ID: On 19 July 2016 at 18:12, Carl Smith wrote: > ?On keys for the editor feature, users can do `from prompt_toolkit.keys > import Keys`?, then use stuff like `Keys.ControlV` easily. The PT API would > make it pretty simple to take a user's Key subclass and set up their > shortcut. I think only do it once per session though, like any event > handler. > ?This^ would go in the IPython config file.*?* ?When you're creating a fullscreen app with PT, do you still call `prompt`? The point really: Do you call a method that accepts the same config args as `prompt`? Could you add another option to the config file that requires a dict, where the keys are `prompt` keyword args, and then just `**kargs` it into the `prompt` call inside IPython? You'd still maybe want IPython APIs for PT stuff people want to do more often, but at least users would always have raw access the much more of the library. ?Best,? -- Carl Smith carl.input at gmail.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From jgomezdans at gmail.com Wed Jul 20 08:25:54 2016 From: jgomezdans at gmail.com (Jose Gomez-Dans) Date: Wed, 20 Jul 2016 13:25:54 +0100 Subject: [IPython-dev] ipywidget GUI Message-ID: Hello, I have a set of functions that I'd like to expose in a notebook as HTML widgets, using ipywidgets (I think that's still the current name ;-D). In the past, I have used interact to do this, but in this case, I'd very much like to hide the pipework in a file, and maybe just have a simple function call in the notebook (e.g. gui_expt1()) that sets up the GUI etc. One option is to define e.g. a dictionary with the different GUI bits (ranges for sliders and so on), and pass it to the interact call, but I was wondering whether other approaches might be better. Thanks! Jose -------------- next part -------------- An HTML attachment was scrubbed... URL: From pmhobson at gmail.com Wed Jul 20 10:01:54 2016 From: pmhobson at gmail.com (Paul Hobson) Date: Wed, 20 Jul 2016 07:01:54 -0700 Subject: [IPython-dev] ipywidget GUI In-Reply-To: References: Message-ID: Michael Waskom's seaborn library does this in his widgets.py submodule. Maybe you can take some inspiration from that: https://github.com/mwaskom/seaborn/blob/master/seaborn/widgets.py On Wed, Jul 20, 2016 at 5:25 AM, Jose Gomez-Dans wrote: > Hello, > > I have a set of functions that I'd like to expose in a notebook as HTML > widgets, using ipywidgets (I think that's still the current name ;-D). In > the past, I have used interact to do this, but in this case, I'd very much > like to hide the pipework in a file, and maybe just have a simple function > call in the notebook (e.g. gui_expt1()) that sets up the GUI etc. > > One option is to define e.g. a dictionary with the different GUI bits > (ranges for sliders and so on), and pass it to the interact call, but I was > wondering whether other approaches might be better. > > Thanks! > Jose > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > https://mail.scipy.org/mailman/listinfo/ipython-dev > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From kikocorreoso at gmail.com Fri Jul 22 06:01:59 2016 From: kikocorreoso at gmail.com (Kiko) Date: Fri, 22 Jul 2016 12:01:59 +0200 Subject: [IPython-dev] [ANN] tutormagic v0.2.0 Message-ID: Hi all, I released v 0.2.0 of tutormagic. What is tutormagic ============== It is a very simple and small package that allows you to embed http://pythontutor.com within the notebook (or in a new tab if you prefer) using a %%tutor cell magic. The main idea is to be used as a learning/teaching tool. Changelog ======== Version 0.2.0 - Added new --tab option (thanks to Holger Karl (@hkarl )). - Added new --height option (thanks to Tom Simonart(@tomsimonart )). - Added new languages available on http://pythontutor.com (Typescript, Ruby, C and C++). Version 0.1.0 - Initial version Installation ======== > pip install tutormagic More info and docs ============== https://github.com/kikocorreoso/tutormagic Acknowledgment =============Thanks to the contributors of tutormagic, Jupyter and Pythontutor. I hope it is useful for anyone here. -------------- next part -------------- An HTML attachment was scrubbed... URL: From takowl at gmail.com Sat Jul 23 09:26:05 2016 From: takowl at gmail.com (Thomas Kluyver) Date: Sat, 23 Jul 2016 14:26:05 +0100 Subject: [IPython-dev] [ANN] tutormagic v0.2.0 In-Reply-To: References: Message-ID: Thanks Kiko! I've used tutormagic before, and I think it's a very useful tool to teach people how Python variables and scopes work. On 22 July 2016 at 11:01, Kiko wrote: > Hi all, > > I released v 0.2.0 of tutormagic. > > What is tutormagic > ============== > It is a very simple and small package that allows you to embed > http://pythontutor.com within the notebook (or in a new tab if you > prefer) using a %%tutor cell magic. > > The main idea is to be used as a learning/teaching tool. > > Changelog > ======== > Version 0.2.0 > > - Added new --tab option (thanks to Holger Karl (@hkarl > )). > - Added new --height option (thanks to Tom Simonart(@tomsimonart > )). > - Added new languages available on http://pythontutor.com (Typescript, > Ruby, C and C++). > > Version 0.1.0 > > - Initial version > > Installation > ======== > > > pip install tutormagic > > More info and docs > ============== > > https://github.com/kikocorreoso/tutormagic > Acknowledgment > =============Thanks to the contributors of tutormagic, Jupyter and > Pythontutor. > > I hope it is useful for anyone here. > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > https://mail.scipy.org/mailman/listinfo/ipython-dev > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From kikocorreoso at gmail.com Tue Jul 26 05:35:46 2016 From: kikocorreoso at gmail.com (Kiko) Date: Tue, 26 Jul 2016 11:35:46 +0200 Subject: [IPython-dev] [ANN] tutormagic v0.2.0 In-Reply-To: References: Message-ID: 2016-07-23 15:26 GMT+02:00 Thomas Kluyver : > Thanks Kiko! I've used tutormagic before, and I think it's a very useful > tool to teach people how Python variables and scopes work. > Great to know. Thanks for the hard work to all the IPython/Jupyter team. > > On 22 July 2016 at 11:01, Kiko wrote: > >> Hi all, >> >> I released v 0.2.0 of tutormagic. >> >> What is tutormagic >> ============== >> It is a very simple and small package that allows you to embed >> http://pythontutor.com within the notebook (or in a new tab if you >> prefer) using a %%tutor cell magic. >> >> The main idea is to be used as a learning/teaching tool. >> >> Changelog >> ======== >> Version 0.2.0 >> >> - Added new --tab option (thanks to Holger Karl (@hkarl >> )). >> - Added new --height option (thanks to Tom Simonart(@tomsimonart >> )). >> - Added new languages available on http://pythontutor.com >> (Typescript, Ruby, C and C++). >> >> Version 0.1.0 >> >> - Initial version >> >> Installation >> ======== >> >> > pip install tutormagic >> >> More info and docs >> ============== >> >> https://github.com/kikocorreoso/tutormagic >> Acknowledgment >> =============Thanks to the contributors of tutormagic, Jupyter and >> Pythontutor. >> >> I hope it is useful for anyone here. >> >> _______________________________________________ >> IPython-dev mailing list >> IPython-dev at scipy.org >> https://mail.scipy.org/mailman/listinfo/ipython-dev >> >> > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > https://mail.scipy.org/mailman/listinfo/ipython-dev > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ludwig.schwardt at gmail.com Wed Jul 27 10:00:22 2016 From: ludwig.schwardt at gmail.com (Ludwig Schwardt) Date: Wed, 27 Jul 2016 16:00:22 +0200 Subject: [IPython-dev] _ipython_key_completions_ has unexpected behaviour Message-ID: Hi, I am very excited about the new custom dict key completer as it potentially replaces many lines of brittle code in my libraries dating back to before IPython 0.10. My excitement was tempered when I used it. The following happens on the latest master: In [6]: class A(object): ...: def _ipython_key_completions_(self): ...: return ['x', 'y'] ...: In [7]: In [7]: a = A() In [8]: a['x x %xmode %xdel xrange I expected the list of options to include only strings returned by _ipython_key_completions_ but instead it gives the whole shebang of filenames, Python keywords, magics, etc. On inspection of the source it seems that all matchers are used unless a custom completer is registered (which is my current setup). Alternatively, the merge_completions=False config option will only return the results of the first successful matcher but since dict_key_matches is the last matcher this will also not help. I would like dict_key_matches to be the only matcher if _ipython_key_completions_ is defined, without resorting to config overrides. Am I the only one? :-) Thanks in advance, Ludwig -------------- next part -------------- An HTML attachment was scrubbed... URL: From takowl at gmail.com Wed Jul 27 16:44:06 2016 From: takowl at gmail.com (Thomas Kluyver) Date: Wed, 27 Jul 2016 21:44:06 +0100 Subject: [IPython-dev] _ipython_key_completions_ has unexpected behaviour In-Reply-To: References: Message-ID: The whole completion system is in dire need of an overhaul to make it more flexible. However, I don't think this is as problematic as it seems - tab completion is only useful with names of more than a couple of characters, and then the ambiguity will disppear rapidly. On 27 July 2016 at 15:00, Ludwig Schwardt wrote: > Hi, > > I am very excited about the new custom dict key completer as it > potentially replaces many lines of brittle code in my libraries dating back > to before IPython 0.10. > > My excitement was tempered when I used it. The following happens on the > latest master: > > In [6]: class A(object): > ...: def _ipython_key_completions_(self): > ...: return ['x', 'y'] > ...: > > In [7]: > > In [7]: a = A() > > In [8]: a['x > x %xmode > %xdel xrange > > > I expected the list of options to include only strings returned by > _ipython_key_completions_ but instead it gives the whole shebang of > filenames, Python keywords, magics, etc. > > On inspection of the source it seems that all matchers are used unless a > custom completer is registered (which is my current setup). Alternatively, > the merge_completions=False config option will only return the results of > the first successful matcher but since dict_key_matches is the last matcher > this will also not help. > > I would like dict_key_matches to be the only matcher if > _ipython_key_completions_ is defined, without resorting to config > overrides. Am I the only one? :-) > > Thanks in advance, > > Ludwig > > > _______________________________________________ > IPython-dev mailing list > IPython-dev at scipy.org > https://mail.scipy.org/mailman/listinfo/ipython-dev > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From ludwig.schwardt at gmail.com Thu Jul 28 05:22:03 2016 From: ludwig.schwardt at gmail.com (Ludwig Schwardt) Date: Thu, 28 Jul 2016 11:22:03 +0200 Subject: [IPython-dev] _ipython_key_completions_ has unexpected behaviour Message-ID: Hi, > The whole completion system is in dire need of an overhaul to make it more > flexible. However, I don't think this is as problematic as it seems - tab > completion is only useful with names of more than a couple of characters, > and then the ambiguity will disppear rapidly. Thanks for clearing that up. I guess I'll stick with the custom completers for now. You underestimate how lazy my typing has become with my finger on the TAB buzzer :-) Regards, Ludwig -------------- next part -------------- An HTML attachment was scrubbed... URL: