These are chat archives for ipython/ipython

5th
Feb 2015
Damian Avila
@damianavila
Feb 05 2015 14:12
@/all the main page is pointing to 2.3 as the latest stable version... is anyone working in the page right now so it can make the quick change?
Brian E. Granger
@ellisonbg
Feb 05 2015 16:43
Meeting today or no?
Min RK
@minrk
Feb 05 2015 17:15
I don't have anything to go over.
Brian E. Granger
@ellisonbg
Feb 05 2015 17:15
Ok
Jonathan Frederic
@jdfreder
Feb 05 2015 17:26
Ok, so no meeting today?
Min RK
@minrk
Feb 05 2015 17:33
Don't think so.
Thomas Kluyver
@takluyver
Feb 05 2015 17:51
@damianavila done
stonebig
@stonebig
Feb 05 2015 18:05
small question on Windows, the kernel.json files are always written in utf-8, or in 'local' code-page ?
Min RK
@minrk
Feb 05 2015 18:06
utf8, I believe
stonebig
@stonebig
Feb 05 2015 18:06
thanks!
Min RK
@minrk
Feb 05 2015 18:06
should be utf8, anyway
stonebig
@stonebig
Feb 05 2015 18:07
and the path in them must always be 'absolute' path ? or can they be relative to something, or include a %dos_variable% ?
Min RK
@minrk
Feb 05 2015 18:08
variables are not expanded, so absolute paths are best
stonebig
@stonebig
Feb 05 2015 18:10
could it be different ? (patched somewhere)
Min RK
@minrk
Feb 05 2015 18:10
not easily
stonebig
@stonebig
Feb 05 2015 18:14
ah, there are several programs ou read it ?
(who)
(which read it)
Min RK
@minrk
Feb 05 2015 18:17
No, not really
it's dealt with here
If you want to change how argv is handled, you can use a custom KernelManager class or KernelSpec class
stonebig
@stonebig
Feb 05 2015 18:25
or directly in IPython/kernel/kernelspec.py line51 (changing the file strings of interest before parsing) ?
Min RK
@minrk
Feb 05 2015 18:25
If you want to work in a customized version of IPython, sure.
I was thinking of being able to use a shipped version of IPython
stonebig
@stonebig
Feb 05 2015 18:31
yes, a non-tainted ipython. my issue is if I prepare a ipython+irkernel version on my pc, I will have these 'irrelevant' absolute path in kernel.json . so I would dream just having to replace the "original absolute path" in the "kernel.json" before zipping per a "[winpython]\something" for example, so a stock IPython accepting live parameters (or dos variable) would kindly manage the absolute path transformation. I confess it is a corner case of your windows corner case.
Min RK
@minrk
Feb 05 2015 18:32
I would do the transform on installation of the kernel.json to the IPython directory
stonebig
@stonebig
Feb 05 2015 18:37
not possible on "opening" ? using some extra parameters given on the commande line ?
Min RK
@minrk
Feb 05 2015 18:39
Not without a custom KernelSpec class or KernelManager class
you can make the kernelspec argv point to a batch script, which uses environment variables however you like
but the kernelspec would at least need to be able to find the script
stonebig
@stonebig
Feb 05 2015 18:48
thank you for these informations, have a nice day.
Andreas Klostermann
@akloster
Feb 05 2015 20:39
I found a way to use asyncio in kivy... I guess it would work in an IPython kernel too. It's a very stupid hack though. I have to copy a method from the stdlib code, and change exactly one line of it...
Thomas Kluyver
@takluyver
Feb 05 2015 21:25
@akloster - what method and what line was that?
timeout = 1/60.0
I transformed the method to a module function, and called it with the loop as first argument ("mocking" a bound method call). This enabled me to call the _run_once method as an interval callback in kivy's main loop, and it doesn't block for too long at a time
I think timeout should better be a parameter to _run_once in the standard library asyncio, but I don't think that's going to happen now that asyncio is in Python 3.4
Thomas Kluyver
@takluyver
Feb 05 2015 21:54
aha
so the change just means that it is guaranteed to return after 1/60 of a second, even with nothing to do?
Thanks
I am going to have a go at the asyncio-based kernel, by the way
Andreas Klostermann
@akloster
Feb 05 2015 21:58
That's nice to here. Yes, the timeout means that the select finishes relatively early