Sagecell with Sage 5.2 and matlab interpreter as default

86 views
Skip to first unread message

fero

unread,
Aug 3, 2012, 3:50:16 AM8/3/12
to sage-...@googlegroups.com
I am still fixing something to reach the end of the installation procedure described at
https://github.com/sagemath/sagecell

I'd like to spend some time in making sagecell working, and even of course contribute to this wonderful project if I am able to.

But I have to be sure that I can reach the following goals:

1. make sagecell working in my development environment ArchLinux
2. playing with sagecell with "sage" and "matlab" interpreters (like I did with previous sage notebook)
3. saving a variable ("out") in a database (it would be great to save it as a ".mat" and as "sage" variable)
4. deploy sage+matlab+sagecell on Debian squeeze

My requirement is to support matlab by default (unfortunately...) so if you think it is feasible
I am going to proceed, otherwise I have to find an hack to let
the actual sage notebook working as a backend for my application
instead of sagecell.

At this time every weird hack you can think about to reach the goals are going to be accepted by me :)

Thank you in advance
Luca

fero

unread,
Aug 3, 2012, 5:15:41 AM8/3/12
to sage-...@googlegroups.com
The problem that I have now in sagecell is that:

* matlab("3**2") --> is not able to spawn the matlab interpreter
* and I don't know how to set matlab as default interpreter for sagecell

wonderful work!

P.S: I am enjoying myself with this evolution of the sample code...

html("<h3>an interactive calculation and plot</h3>")
@interact
def f1(year=slider(1,200,1), c=color_selector((150, 0, 150)),
   a=input_box(0, label="start at", type=int),
   b=input_box(100, label="end at", type=int),
   f=input_box(sin(x)/(2+cos(pi*x/10)), "function"),
):
  k1 = year
  k2 = factor(year)
  print "%s = %s" % (k1, k2)
  var('x')
  plot(f, (a, b), color = c).show()

fero

unread,
Aug 3, 2012, 10:52:53 AM8/3/12
to sage-...@googlegroups.com


Il giorno venerdì 3 agosto 2012 11:15:41 UTC+2, fero ha scritto:
The problem that I have now in sagecell is that:

* matlab("3**2") --> is not able to spawn the matlab interpreter


this one has been "solved" ! I found that matlab was not spawn because /usr/local/bin
was not in the PATH when I execute "sage-native-execute"
that is called also by sage_device

pexepect_env variable
local/lib/python2.7/site-packages/sage/interfaces/expect.py
line 464

at the moment I linked the executable in /usr/bin I have no more time to investigate on this.

Pay attention that if I do

import os; os.getenv("PATH") in sagecell, I see /usr/local/bin directory among results.

 

Jason Grout

unread,
Aug 3, 2012, 11:45:04 AM8/3/12
to sage-...@googlegroups.com
Just FYI, the code (and docs) in the root sagecell directory is version
1 of the code, and is not under development anymore. We are instead
doing active development in the codebase in contrib/ipython-testing/.
Like I mentioned before, the instructions are at

https://github.com/sagemath/sagecell/issues/344

Apparently they didn't work for 5.2, so thanks for looking at updating
them. I just downloaded and compiled 5.2 last night so that I can look
at your updated patch sometime tonight or tomorrow, hopefully.

To start, just do "sage web_server.py" in the contrib/ipython-testing
directory.

Thanks,

Jason


fero

unread,
Aug 5, 2012, 12:24:21 PM8/5/12
to sage-...@googlegroups.com
My installation of sagecell version 1 works quite well for my needs now.
Only thing that I lack is to let the user switch from sage/matlab interpreter.

I will stay on sagecell version 1 now, or taking again the sage notebook,
If I don't succeed in using sagecell interpreter switching.
Reply all
Reply to author
Forward
0 new messages