[IPython-User] Cython magics have been merged!

Flavio Coelho fccoelho@gmail....
Tue Jun 5 08:14:08 CDT 2012


Hi MinRK,

I forked your shebang gist and started what I think should be a first
implementation of a virtualenv magic.
It's still untested, since I don't have a clone of the latest ipython on my
machine, but I'd appreciate if you could take a look at it and tell me if
there is something blatantly wrong... ;-)
https://gist.github.com/2874403/87b3f6dfe47456f8f53d5b0455bad9ea41dffc31

Flávio

On Thu, May 31, 2012 at 11:53 PM, MinRK <benjaminrk@gmail.com> wrote:

>
>
> On Thu, May 31, 2012 at 5:48 PM, Flavio Coelho <fccoelho@gmail.com> wrote:
>
>> If you have worked with virtualenv +virtualenvwrapper before, you know
>> you can switch full python environments (including the interpreter) with a
>> simple:" workon <envname>". This is for example a trivial way to try pypy
>> on your box without messing with your global python installation.
>>
>> It would be cool if we could switch environments on a cell just as easily.
>> With such a feature we could even have multiple ipython versions on a
>> single notebook, but that is probably too wicked... ;-)
>>
> Yes, I'm aware of what virtualenv does, but I am having difficulty in
> seeing why you would want to invoke yet another Python subprocess for each
> cell.  Remember, the Kernel in which the notebook executes is a single
> persistent Python session, and communication with other Pythons would be
> via an additional layer of subprocess communication.  A pypy cell (or
> Python 3 cell, etc.) is *nowhere near* having a pypy Kernel.
>
> But it is easy to write things like this.
>
> For instance, here's a silly cell magic for running code in a pypy
> subprocess:
>
> https://gist.github.com/2848007
>
> And here's one that lets you run any shell program:
>
> https://gist.github.com/2848290
>
> -MinRK
>
>
>
>
>> Em 31/05/2012 06:49, "MinRK" <benjaminrk@gmail.com> escreveu:
>>
>>
>>>
>>> On Thu, May 31, 2012 at 2:46 AM, Flavio Coelho <fccoelho@gmail.com>wrote:
>>>
>>>> Is there a pypy cell in the works? Or even better, a general virtualenv
>>>> cell?
>>>>
>>> What do you mean by a 'virtualenv cell'?
>>>
>>>
>>>
>>>> Em 31/05/2012 02:22, "Fernando Perez" <fperez.net@gmail.com> escreveu:
>>>>
>>>>>  Hi folks,
>>>>>
>>>>> we just concluded review and merge of the cython magics:
>>>>> https://github.com/ipython/ipython/pull/1770!
>>>>>
>>>>> Kudos to Brian for a terrific job, and please let us know if you spot
>>>>> any problems.  There's an example notebook provided
>>>>> (docs/examples/notebooks/cython_extension.ipynb) so you can see it in
>>>>> action.
>>>>>
>>>>> We think this will be very useful, and the system also serves as a
>>>>> reference on how to implement other extensions with useful magics.
>>>>>
>>>>> The R one is also in review and very close to ready:
>>>>> https://github.com/ipython/ipython/pull/1780, so pitch in with your
>>>>> feedback if there's anything there you think can be improved.
>>>>>
>>>>> Cheers,
>>>>>
>>>>> f
>>>>> _______________________________________________
>>>>> IPython-User mailing list
>>>>> IPython-User@scipy.org
>>>>> http://mail.scipy.org/mailman/listinfo/ipython-user
>>>>>
>>>>
>>>> _______________________________________________
>>>> IPython-User mailing list
>>>> IPython-User@scipy.org
>>>> http://mail.scipy.org/mailman/listinfo/ipython-user
>>>>
>>>>
>>>
>>> _______________________________________________
>>> IPython-User mailing list
>>> IPython-User@scipy.org
>>> http://mail.scipy.org/mailman/listinfo/ipython-user
>>>
>>>
>> _______________________________________________
>> IPython-User mailing list
>> IPython-User@scipy.org
>> http://mail.scipy.org/mailman/listinfo/ipython-user
>>
>>
>
> _______________________________________________
> IPython-User mailing list
> IPython-User@scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-user
>
>


-- 
Flávio Codeço Coelho
================
+55(21) 3799-5567
Professor
Escola de Matemática Aplicada
Fundação Getúlio Vargas
Rio de Janeiro - RJ
Brasil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/ipython-user/attachments/20120605/b801d56c/attachment.html 


More information about the IPython-User mailing list