[IPython-User] mathjax version 2

Toby Burnett tburnett@uw....
Wed Feb 22 12:06:39 CST 2012



-----Original Message-----
From: ipython-user-bounces@scipy.org [mailto:ipython-user-bounces@scipy.org] On Behalf Of ipython-user-request@scipy.org
Sent: Wednesday, February 22, 2012 10:00
To: ipython-user@scipy.org
Subject: IPython-User Digest, Vol 100, Issue 28

Send IPython-User mailing list submissions to
	ipython-user@scipy.org

To subscribe or unsubscribe via the World Wide Web, visit
	http://mail.scipy.org/mailman/listinfo/ipython-user
or, via email, send a message with subject or body 'help' to
	ipython-user-request@scipy.org

You can reach the person managing the list at
	ipython-user-owner@scipy.org

When replying, please edit your Subject line so it is more specific than "Re: Contents of IPython-User digest..."


Today's Topics:

   1. Re: Configuring qtconsole for notebook? (Fernando Perez)
   2. Re: mathjax version 2 (Comer Duncan)
   3. Re: mathjax version 2 (Brian Granger)
   4. Run code on engine before any parallel task (Andreas Schr?der)
   5. Re: %edit in qtconsole vs ipython (Ches Martin)
   6. Re: %edit in qtconsole vs ipython (Thomas Kluyver)


----------------------------------------------------------------------

Message: 1
Date: Tue, 21 Feb 2012 10:41:43 -0800
From: Fernando Perez <fperez.net@gmail.com>
Subject: Re: [IPython-User] Configuring qtconsole for notebook?
To: "Discussions about using IPython. http://ipython.org"
	<ipython-user@scipy.org>
Message-ID:
	<CAHAreOo8MwDEo4Rkpk=WUuuexy6+5LJQf9N+Z1PN2vBzv_P5_A@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1

On Tue, Feb 21, 2012 at 9:37 AM, Tom Brander <tombrander@tombrander.com> wrote:
> Went back and did easy_install-2.7 ipython... then started Ipython 
> notebook with tom@tom-Satellite-A105:~/ipython$ ipython notebook 
> --pylab inline And it runs fine BUT still can't find %qtconsole from 
> the notebook??? I still get?Magic function `qtconsole` not found.

I suspect for some reason, your PATH/PYTHONPATH is finding an older version of IPython in your system.  When you overlay a new version, you must make sure that your path and pythonpath are correctly set so that all call forms find the new version.

The easiest solution is to remove the old one from your system, if you can do that.

Cheers,

f


------------------------------

Message: 2
Date: Tue, 21 Feb 2012 16:09:53 -0500
From: Comer Duncan <comer.duncan@gmail.com>
Subject: Re: [IPython-User] mathjax version 2
To: "Discussions about using IPython. http://ipython.org"
	<ipython-user@scipy.org>
Message-ID:
	<CAEL1xhDhzQAPT5F0ohuXoZiGd0iCHk_fsTKAzUCuLNgF26pXtw@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1

HI Brian,

Thanks for the tips.  I think I will just wait until the Mathjax developers decide that version 2.0 is real.  I am just wanting to use equation numbering in a notebook I am working on.  I'm a physicist.
The notebook is about illustrating the hyperbolic character of Maxwell's equations in Minkowski spacetime. This is not new stuff but several techniques which have become quite useful in numerical relativity are discussed, especially how one goes about demonstrating hyperbolicity and the ramifications therein.  The notebook uses the markdown stuff a lot and uses Sympy to do the symbolic calculations.
It is a lot of fun and is good for me to learn/understand better some aspects of Sympy.

I am really enjoying ipython and thank you developers for your efforts. I am using 0.13 and like the interface thus far.

By the way, is there a url where a bunch of ipython notebooks are archived? It would be nice to see what variety of things have been done so far with ipython notebooks!

Best,

Comer

On Tue, Feb 21, 2012 at 12:53 PM, Brian Granger <ellisonbg@gmail.com> wrote:
> * If you are installing MathJax yourself, just get the new version and 
> you should be fine. ?We may need to update the install_mathjax 
> function for the 2.0 version, but it may just work.
> * For the CDN version, it depends on how they handle the upgrade.
>
> For now I would just install the new version locally using 
> IPython.externel.mathjax.install_mathjax.
>
> Cheers,
>
> Brian
>
> On Mon, Feb 20, 2012 at 8:30 PM, Fernando Perez <fperez.net@gmail.com> wrote:
>> On Sun, Feb 19, 2012 at 10:31 AM, Comer Duncan <comer.duncan@gmail.com> wrote:
>>> I am just wondering when you guys plan to put in the latest released 
>>> version of mathjax? ?Version 2.0 is now 'out' and in beta. ?In 
>>> another week or so presumably it will become the official 2.0. Since 
>>> it has some needed enhancements and expanded coverage, it would be 
>>> great if you could make it real for ipython .13 users.
>>
>> Well, we don't actually ship mathjax, we only pull it from a CDN or 
>> from a locally installed copy the user puts in. ?I don't recall how 
>> the code looks right now, but wouldn't it automatically pull 2.0, at 
>> least for CDN users?
>>
>> Cheers,
>>
>> f
>> _______________________________________________
>> IPython-User mailing list
>> IPython-User@scipy.org
>> http://mail.scipy.org/mailman/listinfo/ipython-user
>
>
>
> --
> Brian E. Granger
> Cal Poly State University, San Luis Obispo bgranger@calpoly.edu and 
> ellisonbg@gmail.com _______________________________________________
> IPython-User mailing list
> IPython-User@scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-user


------------------------------

Message: 3
Date: Tue, 21 Feb 2012 13:38:46 -0800
From: Brian Granger <ellisonbg@gmail.com>
Subject: Re: [IPython-User] mathjax version 2
To: "Discussions about using IPython. http://ipython.org"
	<ipython-user@scipy.org>
Message-ID:
	<CAH4pYpQ+ueDOCTsLe5cZmycSdYodT8oMFm2-oJsSy2XoJBjXOg@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1

Comer,

On Tue, Feb 21, 2012 at 1:09 PM, Comer Duncan <comer.duncan@gmail.com> wrote:
> HI Brian,
>
> Thanks for the tips. ?I think I will just wait until the Mathjax
> developers decide that version 2.0 is real. ?I am just wanting to use
> equation numbering in a notebook I am working on. ?I'm a physicist.
> The notebook is about illustrating the hyperbolic character of
> Maxwell's equations in Minkowski spacetime. This is not new stuff but
> several techniques which have become quite useful in numerical
> relativity are discussed, especially how one goes about demonstrating
> hyperbolicity and the ramifications therein. ?The notebook uses the
> markdown stuff a lot and uses Sympy to do the symbolic calculations.
> It is a lot of fun and is good for me to learn/understand better some
> aspects of Sympy.

Sounds very cool.  Once 2.0 is out we can hopefully get equation
numbering working.

> I am really enjoying ipython and thank you developers for your
> efforts. I am using 0.13 and like the interface thus far.

Great!

> By the way, is there a url where a bunch of ipython notebooks are
> archived? It would be nice to see what variety of things have been
> done so far with ipython notebooks!

The only one I know of are the ones in the IPython source code in the
docs/examples/notebooks directory.  That and there are a few notebooks
in the sympy/examples folder of sympy as well.

Cheers,

Brian



> Best,
>
> Comer
>
> On Tue, Feb 21, 2012 at 12:53 PM, Brian Granger <ellisonbg@gmail.com> wrote:
>> * If you are installing MathJax yourself, just get the new version and
>> you should be fine. ?We may need to update the install_mathjax
>> function for the 2.0 version, but it may just work.
>> * For the CDN version, it depends on how they handle the upgrade.
>>
>> For now I would just install the new version locally using
>> IPython.externel.mathjax.install_mathjax.
>>
>> Cheers,
>>
>> Brian
>>
>> On Mon, Feb 20, 2012 at 8:30 PM, Fernando Perez <fperez.net@gmail.com> wrote:
>>> On Sun, Feb 19, 2012 at 10:31 AM, Comer Duncan <comer.duncan@gmail.com> wrote:
>>>> I am just wondering when you guys plan to put in the latest released
>>>> version of mathjax? ?Version 2.0 is now 'out' and in beta. ?In another
>>>> week or so presumably it will become the official 2.0. Since it has
>>>> some needed enhancements and expanded coverage, it would be great if
>>>> you could make it real for ipython .13 users.
>>>
>>> Well, we don't actually ship mathjax, we only pull it from a CDN or
>>> from a locally installed copy the user puts in. ?I don't recall how
>>> the code looks right now, but wouldn't it automatically pull 2.0, at
>>> least for CDN users?
>>>
>>> Cheers,
>>>
>>> f
>>> _______________________________________________
>>> IPython-User mailing list
>>> IPython-User@scipy.org
>>> http://mail.scipy.org/mailman/listinfo/ipython-user
>>
>>
>>
>> --
>> Brian E. Granger
>> Cal Poly State University, San Luis Obispo
>> bgranger@calpoly.edu and ellisonbg@gmail.com
>> _______________________________________________
>> 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



-- 
Brian E. Granger
Cal Poly State University, San Luis Obispo
bgranger@calpoly.edu and ellisonbg@gmail.com


------------------------------

Message: 4
Date: Tue, 21 Feb 2012 23:06:16 +0100
From: Andreas Schr?der <andreas@drqueue.org>
Subject: [IPython-User] Run code on engine before any parallel task
To: ipython-user@scipy.org
Message-ID: <4F441558.9090205@drqueue.org>
Content-Type: text/plain; charset=UTF-8

Hello IPython list,

while working on DrQueueIPython, I have the problem that I need to group
engines together in 'pools' so that tasks for a special pool will only
run on its members.

The purpose of this is that I can have a big cluster with lots of
machines running for different users who need to have their tasks run
isolated from other users.

My current approach is to store (additional) information about
registered engines including pool membership in MongoDB and check these
information via a dependent function before running a task.

I have a wrapper script for starting 'ipengine' (see
https://github.com/kaazoo/DrQueueIPython/blob/master/bin/drqueue_slave.py).
The script takes the engine_id from the ipengine output and tries to run
code using DirectView on that engine_id directly after starting the process.

It works more or less but has several disadvantages:
 * There is some delay between registration of engine and storage of
logfile.
 * There seems to be some delay between registration seen by engine and
registration seen by ipcontroller.
 * It's not possible to make sure that the pool setup code is the first
code that runs on the engine.
 * The computer running the engine process needs to have access to
MongoDB which possibly runs on another machine. Not so good for security.


Do you have any idea how to monitor registration of new engines and
directly run code on them before other tasks are run?
Or do you even have a better suggestion?


Regards,
Andreas

-- 

Andreas Schr?der | developer

DrQueue, the Open Source Distributed Render Queue
http://www.drqueue.org


------------------------------

Message: 5
Date: Tue, 21 Feb 2012 20:34:30 +0000 (UTC)
From: Ches Martin <ches@whiskeyandgrits.net>
Subject: Re: [IPython-User] %edit in qtconsole vs ipython
To: ipython-user@scipy.net
Message-ID: <loom.20120221T212239-897@post.gmane.org>
Content-Type: text/plain; charset=us-ascii

Thomas Kluyver <takowl <at> gmail.com> writes:
> 
> It's tricky to do well in a GUI environment. In the terminal, we
> assume that the editor command will block execution until the user
> closes it. But the command to launch a GUI editor may return
> immediately, and if the editor has multiple files open, closing it to
> run one file is impractical.
> 
> As a compromise, you can use %save to get interactively entered code
> into a file, then %edit and %run to use it.
> 
> Thomas
> 

I can see what you're getting at if you're thinking in terms of a console
editor, taking over the terminal until it quits and returns to IPython, but this
actually works fine already with a GUI editor and IPython running in the
terminal. Using gvim with the -f option for foreground (or alternatives like
--remote-wait), TextMate with `mate -w` for wait, etc. and saving and closing
the window/buffer opened by ipython returns and executes as expected. Quitting
the editor completely, with other previously-opened files, isn't necessary.
Shouldn't it be possible to wait on a child process in qtconsole in the same way?

(Apologies for the double post).

Regards,
Ches



------------------------------

Message: 6
Date: Wed, 22 Feb 2012 14:48:09 +0000
From: Thomas Kluyver <takowl@gmail.com>
Subject: Re: [IPython-User] %edit in qtconsole vs ipython
To: "Discussions about using IPython. http://ipython.org"
	<ipython-user@scipy.org>
Message-ID:
	<CAOvn4qhXm7Tnbhvbt5DYm9pWW7kRniMYWty2fvgAKoHehd=m1g@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1

On 21 February 2012 20:34, Ches Martin <ches@whiskeyandgrits.net> wrote:
> I can see what you're getting at if you're thinking in terms of a console
> editor, taking over the terminal until it quits and returns to IPython, but this
> actually works fine already with a GUI editor and IPython running in the
> terminal. Using gvim with the -f option for foreground (or alternatives like
> --remote-wait), TextMate with `mate -w` for wait, etc. and saving and closing
> the window/buffer opened by ipython returns and executes as expected. Quitting
> the editor completely, with other previously-opened files, isn't necessary.
> Shouldn't it be possible to wait on a child process in qtconsole in the same way?

It's possible to wait for a subprocess, but GUI editors don't have
consistent support for that behaviour, and I think people felt that it
was better to provide a simple model that worked everywhere (%edit
opens it for editing), rather than adding something which a lot of
users would find didn't work. There were some calls to not execute by
default even in the terminal, but evidently that view didn't win out.

People might revisit the discussion if you persuade them that your
system is preferable. I'm fairly ambivalent about it, not being a
heavy user of the feature.

Best wishes,
Thomas


------------------------------

_______________________________________________
IPython-User mailing list
IPython-User@scipy.org
http://mail.scipy.org/mailman/listinfo/ipython-user


End of IPython-User Digest, Vol 100, Issue 28
*********************************************




More information about the IPython-User mailing list