OK, I was gone for the weekend (a friend's wedding). I compiled the
dev version of sage and got it working with ipython 2.0. I forgot how
long sage can take to compile!

One thing is that the sage extension has trouble loading with the
newer version of ipython.

if I run:

%load_ext sage.misc.sage_extension

I get an error that ends with

/home/jason/opt/sage-6.1.beta1/local/lib/python2.7/site-packages/sage/misc/sage_extension.py
in <module>()
    257 #  apparently we will have stateful transformations then.
    258 #  see also https://github.com/ipython/ipython/pull/2402>
--> 259 from IPython.core.inputsplitter import (transform_ipy_prompt,
transform_classic_prompt,
    260                                         transform_help_end,
transform_escaped,
    261
transform_assign_system, transform_assign_magic,

ImportError: cannot import name transform_ipy_prompt

I can send the full error report if you want.

What I noticed is that there might have been a name change from
ipython 0.xx to 2.0 (of transform_ipy_prompt,
transform_classic_prompt, etc..). I made some changes in the code in
the sage_extension.py file and it then loaded the extension, although
I'm not sure it's doing anything now because, for instance, 2^3
returns 1 and not 8.

I'll look into how to use the widgets later today after I finish teaching.



On Fri, Apr 11, 2014 at 5:35 PM, Jason Grout
<[email protected]> wrote:
> On 4/10/14, 18:49, Jason Suagee wrote:
>>
>>
>> Sorry to take so long to post back. I have been going to conferences and
>> haven't had much time to work on anything the past 2 weeks.
>>
>>
>> Jason Grout recommended that we use the widget/comm idea from ipython to
>> facilitate the communication between the front end and backend of the
>> knot editor. He said that what was done in the past for the graph editor
>> was a kludge (for non-native english speakers this is an expression for
>> something which is kind of hacked together). I don't know if this is the
>> direction that you would want to go? I could replicate the kludge idea
>> or try this new method using the ipython notebook interface (or maybe
>> the qtconsole, which I have not tried yet).
>
>
>>
>>
>> I have experimented some with the ipython notebook interface for sage
>> (sage -ipython notebook). I can load some javascript into an output
>> frame and get it to be evaluated, although I cannot as yet figure out
>> how to sync what is going on in the output frame with the python
>> backend. (That would be where the widget idea comes in I suppose.)
>
>
>
> Yes, that's correct.
>
>
>
>>
>>
>> I have a question: My version of sage uses ipython 0.13, whereas ipython
>> is now up to version 2.0, I think. Does the current source for sage use
>> any version of ipython >= 1.0. There are no available examples that I
>> could find of the use of widgets in ipython ver. < 1.0, and the module
>> structure of ipython has changed from ver. < 1.0 to >= 1.0. The change
>> in module structure is making experimentation more difficult.
>>
>
> We recently upgraded to IPython 1.2.1
> (http://trac.sagemath.org/ticket/14713).  You'd have to run a dev version of
> Sage to get that.
>
> I don't think it'd be very hard at all to upgrade to IPython 2.0 (which is
> what you need for widgets).  I'm running it on the Sage cell server right
> now with (I think) no changes to Sage.
>
>
>
>>
>> I have to be honest, I feel like a fish out of water dealing with this
>> part of the project. I can handle the algorithmic parts fine but this
>> part of dealing with the backend/frontend communication might turn out
>> to be pretty difficult. I have an associate/friend who is used to
>> programming in javascript (among other things), and he offered to give
>> me some pointers and provide a little help along the way. So I wouldn't
>> totally be on my own.
>
>
>
> Right now we have at least three different ways for web interfaces to
> communicate with Sage backends:
>
> * sage notebook (e.g., *.sagenb.org): I don't know anyone actively working
> on this.  This is the hack I mentioned above.
>
> * sage cell server: we piggy-backed on the IPython infrastructure and
> messaging/widget system.  I think it's a nice design and lends itself to
> clear, simple communication.
>
> * sage cloud: William's the one to talk about this...
>
> * well, really I guess there's a fourth, and that is with standard
> interacts.
>
> Going forward, I'd say that one possible good route would be to get the
> IPython widget/comm message system working in the cloud sage worksheets (or
> a close approximation thereof) and use that.  If that layer is compatible
> with IPython, then the same widget will work from the IPython notebook and
> the cell server too.
>
>
> Thanks,
>
> Jason
>
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "sage-gsoc" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/sage-gsoc.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-gsoc" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-gsoc.
For more options, visit https://groups.google.com/d/optout.

Reply via email to