[sage-support] Re: Memory issues with maxima in SAGE

2009-08-18 Thread Robert Bradshaw

On Aug 17, 2009, at 2:21 PM, Robert Dodier wrote:

> On Aug 17, 12:06 pm, William Stein  wrote:
>
>> My understanding is that one has to modify the maxima source code
>> itself and recompile maxima.
>
> Not so -- EXT:SET-LIMIT can be called anytime after the
> Maxima session is launched.
> To evaluate a single Lisp expression in Maxima:
>
> :lisp (...)


I didn't know that, very handy!

- Robert


--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: change a string to sage expression by sage_eval

2009-08-18 Thread Robert Bradshaw

On Aug 17, 2009, at 3:45 AM, Viny wrote:

>
> Hello!
>
> Is it possible to have the equivalent sage expression of the following
> string, by using sage_eval() or another function without getting this
> error in while the transcription :

There was talk a while back about x[1] giving a sub-scripted x, but I  
don't think anything concrete came of it (IIRC there were bigger  
symbolic changes going on at the time). What is phi, v, etc. in your  
context?

>
> /lib/python2.6/site-packages/sage/misc/sage_eval.py", line 199, in
> sage_eval return eval(source, sage.all.__dict__, locals) File
> "", line 1, in  TypeError:
> 'sage.symbolic.expression.Expression' object is unsubscriptable
>
> A part of the string is:
>
> [(dx**4*dy**4*E**(2*phi[0, 0])*epsr**2* ((16*ni*(Cxy[0, 0] + (phi[0,
> -1] - 2*phi[0, 0] + phi[0, 1])/dy**2 +   (phi[-1, 0] - 2*phi[0, 0] +
> phi[1, 0])/dx**2 +   (ni*(-(E**phi[0, 0]*u[0, 0]) + v[0, 0]/E**phi[0,
> 0]))/epsr))/  (E**phi[0, 0]*epsr) + (8*(dx**2 + dy**2)* (dx**2*((-4 +
> phi[0, -1] - phi[0, 1])*v[0, -1] + 8*v[0, 0] +  (-4 - phi[0, -1] + phi
> [0, 1])*v[0, 1]) +   dy**2*((-4 + phi[-1, 0] - phi[1, 0])*v[-1, 0] +
> 8*v[0, 0] +  (-4 - phi[-1, 0] + phi[1, 0])*v[1, 0])))/(dx**4*dy**4) +
> ((-4 + phi[0, 0] - phi[0, 2])* (dx**2*((-4 + phi[0, 0] - phi[0, 2])*v
> [0, 0] + 8*v[0, 1] +  (-4 - phi[0, 0] + phi[0, 2])*v[0, 2]) +   dy**2*
> ((-4 + phi[-1, 1] - phi[1, 1])*v[-1, 1] + 8*v[0, 1] +  (-4 - phi[-1,
> 1] + phi[1, 1])*v[1, 1])))/(dx**2*dy**4) +  ((-4 + phi[0, 0] - phi[2,
> 0])* (dx**2*((-4 + phi[1, -1] - phi[1, 1])*v[1, -1] + 8*v[1, 0] +  (-4
> - phi[1, -1] + phi[1, 1])*v[1, 1]) +   dy**2*((-4 + phi[0, 0] - phi[2,
> 0])*v[0, 0] + 8*v[1, 0] +  (-4 - phi[0, 0] + phi[2, 0])*v[2, 0])))/
> (dx**4*dy**2)))/  (2*dx**4*(-8*dy**2*E**phi[0, 0]*epsr*ni*(2 +
> dy**2*Cxy[0, 0] + phi[0, -1] -   2*phi[0, 0] + phi[0, 1]) -
> 16*dy**4*ni**2*v[0, 0] +   E**(2*phi[0, 0])*epsr**2*((-4 + phi[0, 0] -
> phi[0, 2])*v[0, 0] +   4*v[0, 1] + (-phi[0, 0] + phi[0, 2])*v[0, 2]))
> +  dx**2*dy**2*E**phi[0, 0]*epsr*(-16*dy**2*ni*(2 + phi[-1, 0] - 2*phi
> [0, 0] +   phi[1, 0]) + E**phi[0, 0]*epsr*((-4 + phi[-1, 1] - phi[1,
> 1])* v[-1, 1] + 8*v[0, 1] + (-4 + phi[1, -1] - phi[1, 1])*v[1, -1] +
> 8*v[1, 0] - (8 + phi[-1, 1] + phi[1, -1] - 2*phi[1, 1])*v[1, 1])) +
> 2*dy**4*E**(2*phi[0, 0])*epsr**2*((-4 + phi[0, 0] - phi[2, 0])*v[0, 0]
> +   4*v[1, 0] + (-phi[0, 0] + phi[2, 0])*v[2, 0])) -  (dx**4*dy**4*E**
> (2*phi[0, 0])*epsr**2*(64*(dx**(-2) + dy**(-2))**2 +  (16*ni**2)/(E**
> (2*phi[0, 0])*epsr**2) + (4 - phi[0, 0] + phi[0, 2])**2/  dy**4 + (4 -
> phi[0, 0] + phi[2, 0])**2/dx**4)* (-(((ni**2*(16/dx**4 + 16/dy**4 + (u
> [0, 0] - u[0, 2])**2/dy**4 +   (u[0, 0] - u[2, 0])**2/dx**4 +  
> (16*ni*(-
> (E**phi[0, 0]*u[0, 0]) +  v[0, 0]/E**phi[0, 0])*(Cxy[0, 0] + (phi[0,
> -1] - 2*phi[0, 0] +   phi[0, 1])/dy**2 + (phi[-1, 0] - 2*phi[0, 0] +
> phi[1, 0])/dx**  2 + (ni*(-(E**phi[0, 0]*u[0, 0]) + v[0, 0]/E**phi[0,
> 0]))/ epsr))/epsr + 16*(2/dx**2 + 2/dy**2 + (E**phi[0, 0]*ni*u[0, 0]
> +   (ni*v[0, 0])/E**phi[0, 0])/epsr)**2 + (v[0, 0] - v[0, 2])**2/
> dy**4 + (v[0, 0] - v[2, 0])**2/dx**4))/(4*epsr**2) +   ((2*dx**4*
> (8*dy**2*E**phi[0, 0]*epsr*ni*(2 - phi[0, -1] + 2*phi[0, 0] -  phi[0,
> 1]) + 8*dy**4*E**phi[0, 0]*ni*(-(epsr*Cxy[0, 0]) + 2*  E**phi[0, 0]
> *ni*u[0, 0]) + epsr**2*((4 + phi[0, 0] - phi[0, 2])*  u[0, 0] - 4*u[0,
> 1] + (-phi[0, 0] + phi[0, 2])*u[0, 2])) +   dx**2*dy**2*epsr*
> (16*dy**2*E**phi[0, 0]*ni*(2 - phi[-1, 0] + 2*  phi[0, 0] - phi[1, 0])
> + epsr*((4 + phi[-1, 1] - phi[1, 1])*  u[-1, 1] - 8*u[0, 1] + (4 + phi
> [1, -1] - phi[1, 1])*  u[1, -1] - 8*u[1, 0] - (phi[-1, 1] + phi[1, -1]
> -  2*(4 + phi[1, 1]))*u[1, 1])) + 2*dy**4*epsr**2* ((4 + phi[0, 0] -
> phi[2, 0])*u[0, 0] - 4*u[1, 0] +   (-phi[0, 0] + phi[2, 0])*u[2, 0]))*
> (2*dx**4*(-8*dy**2*E**phi[0, 0]*epsr*ni*(2 + dy**2*Cxy[0, 0] + phi
> [0,   -1] - 2*phi[0, 0] + phi[0, 1]) - 16*dy**4*ni**2*v[0, 0] +   E**
> (2*phi[0, 0])*epsr**2*((-4 + phi[0, 0] - phi[0, 2])*v[0, 0] + 4*  v[0,
> 1] + (-phi[0, 0] + phi[0, 2])*v[0, 2])) +   dx**2*dy**2*E**phi[0, 0]
> *epsr*(-16*dy**2*ni*(2 + phi[-1, 0] - 2*  phi[0, 0] + phi[1, 0]) +
> E**phi[0, 0]*epsr* ((-4 + phi[-1, 1] - phi[1, 1])*v[-1, 1] + 8*v[0, 1]
> +  (-4 + phi[1, -1] - phi[1, 1])*v[1, -1] + 8*v[1, 0] -  (8 + phi[-1,
> 1] + phi[1, -1] - 2*phi[1, 1])*v[1, 1])) +   2*dy**4*E**(2*phi[0, 0])
> *epsr**2*((-4 + phi[0, 0] - phi[2, 0])* v[0, 0] + 4*v[1, 0] + (-phi[0,
> 0] + phi[2, 0])*v[2, 0])))/ (64*dx**8*dy**8*E**(2*phi[0, 0])*epsr**4))
> * -8*(dx**2 + dy**2)*(dx**2*((4 + phi[0, -1] - phi[0, 1])*u[0, -1]
> -   8*u[0, 0] + (4 - phi[0, -1] + phi[0, 1])*u[0, 1]) +  dy**2*((4 +
> phi[-1, 0] - phi[1, 0])*u[-1, 0] - 8*u[0, 0] + (4 - phi[-1, 0] + phi
> [1, 0])*u[1, 0])))/(dx**4*dy**4) + ((4 + phi[0, 0] - phi[0, 2])* 
> (dx**2*
> ((4 + phi[0, 0] - phi[0, 2])* u[0, 0] - 8*u[0, 1] + (4 - phi[0, 0] +
> phi[0, 2])*u[0, 2]) +  dy**2*((4 + phi[-1, 1] - phi[1, 1])*u[-1, 1] -
> 8*u[0, 1] +   (4 - phi[-1, 1] + phi[1, 1])*u[1, 1])))/(d

[sage-support] Re: Load Maxima

2009-08-18 Thread Minh Nguyen

Hi Mikie,

On Tue, Aug 18, 2009 at 7:16 AM, Mikie wrote:
>
> How do I load Maxima?  I using a Python script.

If you want to access the Sage library from your Python script, you
need to run that script using the version of Python that comes with
Sage. The command "sage -python /path/to/my/python/script.py" should
do the trick. To access the functionalities of Maxima from that
script, you can pass all Maxima commands to the function maxima(). For
example, say I have a Python script as follows and Sage is in my PATH:

[mv...@sage mvngu]$ which sage
/usr/local/bin/sage
[mv...@sage mvngu]$ pwd
/scratch/mvngu
[mv...@sage mvngu]$ cat demo.py
from sage.all import *

print maxima("2 + 3;")

I would then run the Python script "demo.py" as follows:

[mv...@sage mvngu]$ sage -python demo.py
   5

and the answer 5 is the output of the version of Maxima that's bundled
with Sage.

-- 
Regards
Minh Van Nguyen

--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: can't run *.sage scripts from command line

2009-08-18 Thread Minh Nguyen

Hi Oscar,

On Tue, Aug 18, 2009 at 3:39 AM, Oscar Lazo wrote:
> Hello,
>
> I've compiled sage 4.1.1, and it seems to work nicely. However, I can't run
> *.sage scripts from the command line.
>
> I've made a file named test.sage with the following content:
>
> print "Hello World"
> print 8^3
>
> and run "sage test.sage"
>
> and get the following error:
> 'import site' failed; use -v for traceback
> Traceback (most recent call last):
>   File "demo.py", line 2, in 
> from sage.all_cmdline import *   # import sage library
> ImportError: No module named sage.all_cmdline

This is strange indeed. Say my current directory is this

[mv...@sage mvngu]$ pwd
/scratch/mvngu

and I have installed Sage locally:

[mv...@sage mvngu]$ cd build/sage-4.1.1/
[mv...@sage sage-4.1.1]$ pwd
/scratch/mvngu/build/sage-4.1.1
[mv...@sage sage-4.1.1]$ cd ../..

I have a Sage script "test.sage" with the following content as above:

[mv...@sage mvngu]$ cat test.sage
print "Hello World"
print 8^3

Then I would run that script with my local Sage installation:

[mv...@sage mvngu]$ build/sage-4.1.1/sage test.sage
Hello World
512


As a guess, I think you have put the location of Sage in your PATH or
you have installed Sage system-wide.

-- 
Regards
Minh Van Nguyen

--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Can I control the location of the axes? My x-axis sometimes shows up in the middle...

2009-08-18 Thread Philip Brocoum

If you look at my list_plot at http://imgur.com/OHorX.png you will
notice that the x-axis is in the middle of the graph for some reason.
This is confusing, because it makes it look as though some values are
negative, when they really aren't (y goes from 8 to 15). Options such
as xmin or ymin don't help.

Is there any way to fix this?

Thanks!

Philip

--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] can sage support natural textbook display?

2009-08-18 Thread zasdfg

like this picture
http://edu.casio.com/products/adves/fx82esplus/images/closeup_fx82esplus.jpg

--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: can sage support natural textbook display?

2009-08-18 Thread Minh Nguyen

Hi,

On Tue, Aug 18, 2009 at 12:09 PM, zasdfg wrote:
>
> like this picture
> http://edu.casio.com/products/adves/fx82esplus/images/closeup_fx82esplus.jpg

You mean something like this?

http://sage.math.washington.edu/home/mvngu/doc/screenshots/sage-notebook.png

-- 
Regards
Minh Van Nguyen

--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: Can I control the location of the axes? My x-axis sometimes shows up in the middle...

2009-08-18 Thread Jason Grout

Philip Brocoum wrote:
> If you look at my list_plot at http://imgur.com/OHorX.png you will
> notice that the x-axis is in the middle of the graph for some reason.
> This is confusing, because it makes it look as though some values are
> negative, when they really aren't (y goes from 8 to 15). Options such
> as xmin or ymin don't help.
> 
> Is there any way to fix this?


I am almost done with an extensive modification of the plotting code 
that uses the new matplotlib and fixes this problem.  I think it will be 
done before the end of the week.  I just have to finish implementing the 
gridline functionality using calls to matplotlib instead of all the 
custom code that we use.

The philosophy I've taken with these modifications is that axes in the 
center of the picture should *only* cross at the origin.  If your plot 
is entirely contained in the upper right quadrant, then you will see 
axes on the left and the bottom.  If your graph is entirely contained in 
the lower right quadrant, then you will see axes on the left and the 
top.  If your graph covers the xrange (1,5) and the yrange (-3,3), then 
you will see the y-axis on the left, and the x-axis will cut through the 
middle of your graph.  Essentially, any axis line that cuts through your 
graph is actually the axis (i.e., x or y = 0).  Any other time, the axis 
is on the side of the graph that it should be intuitively, given the 
quadrant your picture is in.

It would be easy to add functionality to allow a user to specify an axis 
intersection coordinate, but for now, I am just implementing the current 
functionality.

I'm also making it trivial to get the matplotlib object out of a Sage 
Graphic(), so you can use the extensive and very nice tools in 
matplotlib to post-process graphs.

Thanks,

Jason


--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Title a Digraph

2009-08-18 Thread docfleetwood

I now how to name a graph with 'g.name("name")'.  But is there a way
to display the name when you display the graph?  ie. as a title above
or below the graph.  I can't seem to find a command or any example
where this is done.

So something like...

show(g,display_name=True)
--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] sage notebook worksheets lost content

2009-08-18 Thread bsdz

Hi

I just checked back at my workbooks on www.sagenb.org and found most
of my workbooks have had their content replaced with a single "e"
character.

Does anyone know how I can recover my workbooks?

Blair
--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: sage notebook worksheets lost content

2009-08-18 Thread Marshall Hampton

There might be a better way to do this, but here is one way:

In a cell of your worksheet, do:

%sh
ls -t ../../snapshots |head

which will give you a list of the most recent snapshots of your
worksheets.  For my worksheet, the most recent one was called:
1250606636.bz2.  So then you can do:

%sh
cp ../../snapshots/1250606636.bz2 .

and you will get a link to that compressed worksheet snapshot.  You
could then unpack it, and then paste it in after clicking "Edit" in
the notebook.

That's a little tedious if you have lots of worksheets lost in this
way - it might be possible to restore all of them with a script, but
I'm not sure exactly how to do that on sagenb.org.

-Marshall Hampton

On Aug 18, 9:26 am, bsdz  wrote:
> Hi
>
> I just checked back at my workbooks onwww.sagenb.organd found most
> of my workbooks have had their content replaced with a single "e"
> character.
>
> Does anyone know how I can recover my workbooks?
>
> Blair
--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: Title a Digraph

2009-08-18 Thread William Stein

On Tue, Aug 18, 2009 at 7:10 AM, docfleetwood wrote:
>
> I now how to name a graph with 'g.name("name")'.  But is there a way
> to display the name when you display the graph?  ie. as a title above
> or below the graph.  I can't seem to find a command or any example
> where this is done.
>
> So something like...
>
> show(g,display_name=True)

That sounds like a great feature.  You should implement it and post a patch.

William

--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: Error while installing sage 4.1.1 on server for multi users.

2009-08-18 Thread Minh Nguyen

Hi,

On Tue, Aug 18, 2009 at 1:41 AM, mrotsliah wrote:
>
> I followed the instructions for System-wide install found here
>
> http://www.sagemath.org/doc/installation/source.html#installation-in-a-multiuser-environment
>
> When I log on to the server, I try to run sage, and I see the output
> below.  There is no folder /home/bob/.sage/ipython.  Hitting RETURN at
> the end of the code outputs hundreds of lines stuff.
>
> How would I fix this problem?  Thanks.
>
> $.: sage
> --
> | Sage Version 4.1.1, Release Date: 2009-08-14   |
> | Type notebook() for the GUI, and license() for information.|
> --
> cp: cannot stat `/home/bob/.sage/ipython': Permission denied
> Traceback (most recent call last):
>  File "/usr/local/sage-4.1.1/local/bin/sage-cleaner", line 28, in
> 
>os.makedirs(tmp)
>  File "/usr/local/sage-4.1.1/local/lib/python/os.py", line 150, in
> makedirs
>makedirs(head, mode)
>  File "/usr/local/sage-4.1.1/local/lib/python/os.py", line 157, in
> makedirs
>mkdir(name, mode)
> OSError: [Errno 13] Permission denied: '/home/bob/.sage//temp'
> **
> Welcome to IPython. I will try to create a personal configuration
> directory
> where you can customize many aspects of IPython's functionality in:
>
> /home/bob/.sage/ipython
> Initializing from configuration /usr/local/sage-4.1.1/local/lib/
> python2.6/site-packages/IPython/UserConfig
> WARNING:
>
> There was a problem with the installation:
> [Errno 13] Permission denied: '/home/bob/.sage/ipython'
> Try to correct it or contact the developers if you think it's a bug.
> IPython will proceed with builtin defaults.
> Please press  to start IPython.

Hmm... the error looks suspicious. What operating system are you
using? Which Linux distribution? The instructions at

http://www.sagemath.org/doc/installation/source.html#installation-in-a-multiuser-environment

worked fine for me under Ubuntu 9.04.

-- 
Regards
Minh Van Nguyen

--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: can sage support natural textbook display?

2009-08-18 Thread William Stein

On Tue, Aug 18, 2009 at 3:51 AM, Minh Nguyen wrote:
>
> Hi,
>
> On Tue, Aug 18, 2009 at 12:09 PM, zasdfg wrote:
>>
>> like this picture
>> http://edu.casio.com/products/adves/fx82esplus/images/closeup_fx82esplus.jpg
>
> You mean something like this?
>
> http://sage.math.washington.edu/home/mvngu/doc/screenshots/sage-notebook.png
>
> --

Note that Minh clicked the "typeset" checkbox in the top middle of the screen.

William

--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: Error while installing sage 4.1.1 on server for multi users.

2009-08-18 Thread Simon King

Hi!

On 17 Aug., 17:41, mrotsliah  wrote:
> I followed the instructions for System-wide install found here
>
> http://www.sagemath.org/doc/installation/source.html#installation-in-...
>
> When I log on to the server, I try to run sage, and I see the output
> below.  There is no folder /home/bob/.sage/ipython.  Hitting RETURN at
> the end of the code outputs hundreds of lines stuff.
>
> How would I fix this problem?  Thanks.
>
> $.: sage
> --
> | Sage Version 4.1.1, Release Date: 2009-08-14                       |
> | Type notebook() for the GUI, and license() for information.        |
> --
> cp: cannot stat `/home/bob/.sage/ipython': Permission denied
...

If I am not mistaken, /home/bob/.sage/ipython is a folder that should
normally be generated once the user "bob" starts sage for the first
time. It contains certain data that bob creates in his Sage sessions,
both including permanent data that remain even after upgrading Sage,
and temporary data that are deleted when Sage is terminated.

And apparently you have no write permission in bob's home directory,
which is indeed strange -- because either you are bob, hence, shoud
have write permission in your home, or you are not bob, and so why
would Sage try to write in his home directory on your behalf?

Best regards,
Simon

--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: Error while installing sage 4.1.1 on server for multi users.

2009-08-18 Thread Simon King

Oops:

On 18 Aug., 22:04, Simon King  wrote:
> If I am not mistaken, /home/bob/.sage/ipython is a folder ...

I mean, /home/bob/.sage is that folder, and its sub-folder ipython is
one example for the permanent data it contains.

--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: Title a Digraph

2009-08-18 Thread Jason Grout

William Stein wrote:
> On Tue, Aug 18, 2009 at 7:10 AM, docfleetwood wrote:
>> I now how to name a graph with 'g.name("name")'.  But is there a way
>> to display the name when you display the graph?  ie. as a title above
>> or below the graph.  I can't seem to find a command or any example
>> where this is done.
>>
>> So something like...
>>
>> show(g,display_name=True)
> 
> That sounds like a great feature.  You should implement it and post a patch..


This sounds great.  I think

show(g,title=True)

or

show(g,title="My text")

would be a nice interface.  If title=True, then the object's natural 
title (e.g., the graph name) is used.  Otherwise, the text string is used.

Jason


--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: Load Maxima

2009-08-18 Thread Mikie

Yes, that works.
However, I am trying to create a function that has Maxima functions in
it and I can't seem to pass values to it.  I am using a Python
function.

Something like this
---
def Subs(x,y):
y1=maxima("float(x);");y1
maxima("p1:y1;");print maxima("p1;")
a1=maxima("s3:x*y;");
return a1
-
Is it possible to pass the variables into Maxima function?


On Aug 18, 5:30 am, Minh Nguyen  wrote:
> Hi Mikie,
>
> On Tue, Aug 18, 2009 at 7:16 AM, Mikie wrote:
>
> > How do I load Maxima?  I using a Python script.
>
> If you want to access the Sage library from your Python script, you
> need to run that script using the version of Python that comes with
> Sage. The command "sage -python /path/to/my/python/script.py" should
> do the trick. To access the functionalities of Maxima from that
> script, you can pass all Maxima commands to the function maxima(). For
> example, say I have a Python script as follows and Sage is in my PATH:
>
> [mv...@sage mvngu]$ which sage
> /usr/local/bin/sage
> [mv...@sage mvngu]$ pwd
> /scratch/mvngu
> [mv...@sage mvngu]$ cat demo.py
> from sage.all import *
>
> print maxima("2 + 3;")
>
> I would then run the Python script "demo.py" as follows:
>
> [mv...@sage mvngu]$ sage -python demo.py
>                                        5
>
> and the answer 5 is the output of the version of Maxima that's bundled
> with Sage.
>
> --
> Regards
> Minh Van Nguyen
--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: Can I control the location of the axes? My x-axis sometimes shows up in the middle...

2009-08-18 Thread Philip Brocoum

Great! That sounds like just the thing :-)
--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: Title a Digraph

2009-08-18 Thread Jason Grout

Jason Grout wrote:
> William Stein wrote:
>> On Tue, Aug 18, 2009 at 7:10 AM, docfleetwood wrote:
>>> I now how to name a graph with 'g.name("name")'.  But is there a way
>>> to display the name when you display the graph?  ie. as a title above
>>> or below the graph.  I can't seem to find a command or any example
>>> where this is done.
>>>
>>> So something like...
>>>
>>> show(g,display_name=True)
>> That sounds like a great feature.  You should implement it and post a patch..
> 
> 
> This sounds great.  I think
> 
> show(g,title=True)
> 
> or
> 
> show(g,title="My text")
> 
> would be a nice interface.  If title=True, then the object's natural 
> title (e.g., the graph name) is used.  Otherwise, the text string is used.
> 


docfleetwood: if you don't get to this before me, I'll try to add this 
to my overhaul of the plotting code.  If title=True, I'll use g.name() 
(if defined) as the title.  If g.name() is not defined, I'll use 
g.__custom_name, which is what you assign when you do g.rename('some 
text').

In fact, maybe the graph code ought to set the __custom_name attribute, 
to be consistent with the rest of Sage, instead of using _backend.name. 
  What do you think, Robert/anyone else interested?

Jason



--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: Load Maxima

2009-08-18 Thread William Stein

On Tue, Aug 18, 2009 at 2:30 PM, Mikie wrote:
>
> Yes, that works.
> However, I am trying to create a function that has Maxima functions in
> it and I can't seem to pass values to it.  I am using a Python
> function.
>
> Something like this
> ---
> def Subs(x,y):
>    y1=maxima("float(x);");y1
>    maxima("p1:y1;");print maxima("p1;")
>    a1=maxima("s3:x*y;");
>    return a1
> -
> Is it possible to pass the variables into Maxima function?

If you do

  maxima.eval("foo")

it is exactly like typing foo at the command line in Maxima.  You can
do anything with that.  E.g., above do

   maxima.eval("p1:y1")

to set p1 to y1 in maxima.

William

>
>
> On Aug 18, 5:30 am, Minh Nguyen  wrote:
>> Hi Mikie,
>>
>> On Tue, Aug 18, 2009 at 7:16 AM, Mikie wrote:
>>
>> > How do I load Maxima?  I using a Python script.
>>
>> If you want to access the Sage library from your Python script, you
>> need to run that script using the version of Python that comes with
>> Sage. The command "sage -python /path/to/my/python/script.py" should
>> do the trick. To access the functionalities of Maxima from that
>> script, you can pass all Maxima commands to the function maxima(). For
>> example, say I have a Python script as follows and Sage is in my PATH:
>>
>> [mv...@sage mvngu]$ which sage
>> /usr/local/bin/sage
>> [mv...@sage mvngu]$ pwd
>> /scratch/mvngu
>> [mv...@sage mvngu]$ cat demo.py
>> from sage.all import *
>>
>> print maxima("2 + 3;")
>>
>> I would then run the Python script "demo.py" as follows:
>>
>> [mv...@sage mvngu]$ sage -python demo.py
>>                                        5
>>
>> and the answer 5 is the output of the version of Maxima that's bundled
>> with Sage.
>>
>> --
>> Regards
>> Minh Van Nguyen
> >
>



-- 
William Stein
Associate Professor of Mathematics
University of Washington
http://wstein.org

--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: Load Maxima

2009-08-18 Thread Simon King

Hi William, hi Mikie,

On 19 Aug., 01:27, William Stein  wrote:
> On Tue, Aug 18, 2009 at 2:30 PM, Mikie wrote:
>
> > Yes, that works.
> > However, I am trying to create a function that has Maxima functions in
> > it and I can't seem to pass values to it.  I am using a Python
> > function.
>
> > Something like this
> > ---
> > def Subs(x,y):
> >    y1=maxima("float(x);");y1
> >    maxima("p1:y1;");print maxima("p1;")
> >    a1=maxima("s3:x*y;");
> >    return a1
> > -
> > Is it possible to pass the variables into Maxima function?
>
> If you do
>
>   maxima.eval("foo")
>
> it is exactly like typing foo at the command line in Maxima.  You can
> do anything with that.  E.g., above do
>
>    maxima.eval("p1:y1")

I am not sure if this is what Mikie had in mind. It seems like he
wants a python function that has an argument x, and he wants to pass
*this argument* (not just the string 'x') to maxima.

Certainly I am not a maxima expert. But extrapolating from other
interfaces, you could try to transform the argument x into maxima by
  xm = maxima(x)
Of course, it depends both on the input and on the quality of the
maxima interface whether this transformation works. In bad cases, you
need to pre-process x before passing it to maxima.

If you want to do computations with the maxima version xm of x, you
could do it in a python way
  xm.method_name(arguments)
or you could directly talk with maxima, by passing strings, as William
explained above. Note that xm is known to maxima by the name xm.name
().
So, again extrapolating from other interfaces, I think youcould do
  maxima.eval('p1:%s'%(xm.name()))
whatever this means.

Cheers,
Simon
--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: Title a Digraph

2009-08-18 Thread docfleetwood

Well I'm glad I could help by coming up with a good idea.  I've got
lots of questions so maybe a few other ideas might pop up too :-)

I would love to help but I know absolutely nothing about programming.
In fact, playing with Sage has pretty much been my introduction to
programming.  I teach high school biology and would like my kids to
work with some more mathematics.  I'm also part of a national
biomathematics program that is trying to write curriculum for the high
school level to get younger folks interested and ahead of the game.  I
work with a team of high school and college math and biology teachers
and researchers.  Biology is becoming such an information science!  As
part of that, I have taken it upon myself to investigate Sage for
possible inclusion in some of our modules.  The students could start
an account and work through some preset presentations and then inquire
and investigate on their own.  I think it would be great for them and
they would learn some programming too (much as I am now).

So when William says, "You" should implement it and post a patch, "I"
would have no idea even where to begin.  So he clearly means "you -
Jason" and not "me" :-)   So rest assured that I won't get to it
before you.  Not that I wouldn't be willing and/or don't appreciate
what you all have done and the help you all have given me with my
questions so far.  William made my life MUCH easier already with his
suggestions in other posts.  If there is some other way I can help,
I'd be happy to lend a hand.

Tom

On Aug 18, 7:11 pm, Jason Grout  wrote:
> Jason Grout wrote:
> > William Stein wrote:
> >> On Tue, Aug 18, 2009 at 7:10 AM, docfleetwood 
> >> wrote:
> >>> I now how to name a graph with 'g.name("name")'.  But is there a way
> >>> to display the name when you display the graph?  ie. as a title above
> >>> or below the graph.  I can't seem to find a command or any example
> >>> where this is done.
>
> >>> So something like...
>
> >>> show(g,display_name=True)
> >> That sounds like a great feature.  You should implement it and post a 
> >> patch..
>
> > This sounds great.  I think
>
> > show(g,title=True)
>
> > or
>
> > show(g,title="My text")
>
> > would be a nice interface.  If title=True, then the object's natural
> > title (e.g., the graph name) is used.  Otherwise, the text string is used.
>
> docfleetwood: if you don't get to this before me, I'll try to add this
> to my overhaul of the plotting code.  If title=True, I'll use g.name()
> (if defined) as the title.  If g.name() is not defined, I'll use
> g.__custom_name, which is what you assign when you do g.rename('some
> text').
>
> In fact, maybe the graph code ought to set the __custom_name attribute,
> to be consistent with the rest of Sage, instead of using _backend.name.
>   What do you think, Robert/anyone else interested?
>
> Jason
--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: Title a Digraph

2009-08-18 Thread Minh Nguyen

Hi Tom,

On Wed, Aug 19, 2009 at 10:11 AM, docfleetwood wrote:
>
> Well I'm glad I could help by coming up with a good idea.  I've got
> lots of questions so maybe a few other ideas might pop up too :-)
>
> I would love to help but I know absolutely nothing about programming.
> In fact, playing with Sage has pretty much been my introduction to
> programming.  I teach high school biology and would like my kids to
> work with some more mathematics.  I'm also part of a national
> biomathematics program that is trying to write curriculum for the high
> school level to get younger folks interested and ahead of the game.  I
> work with a team of high school and college math and biology teachers
> and researchers.  Biology is becoming such an information science!  As
> part of that, I have taken it upon myself to investigate Sage for
> possible inclusion in some of our modules.  The students could start
> an account and work through some preset presentations and then inquire
> and investigate on their own.  I think it would be great for them and
> they would learn some programming too (much as I am now).

In that case, you might be glad to know that Marshall Hampton is
updating Biopython as an optional package of Sage. Biopython is a
Python package for research and study in bioinformatics. Its website
is

http://biopython.org/wiki/Main_Page

and the ticket to update Biopython in Sage is

http://trac.sagemath.org/sage_trac/ticket/6634

-- 
Regards
Minh Van Nguyen

--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: Title a Digraph

2009-08-18 Thread docfleetwood

Very cool - thanks for the info.  A nice teaser.  When is Sage 5.0
coming out :-)

On Aug 18, 8:19 pm, Minh Nguyen  wrote:
> Hi Tom,
>
>
>
> On Wed, Aug 19, 2009 at 10:11 AM, docfleetwood wrote:
>
> > Well I'm glad I could help by coming up with a good idea.  I've got
> > lots of questions so maybe a few other ideas might pop up too :-)
>
> > I would love to help but I know absolutely nothing about programming.
> > In fact, playing with Sage has pretty much been my introduction to
> > programming.  I teach high school biology and would like my kids to
> > work with some more mathematics.  I'm also part of a national
> > biomathematics program that is trying to write curriculum for the high
> > school level to get younger folks interested and ahead of the game.  I
> > work with a team of high school and college math and biology teachers
> > and researchers.  Biology is becoming such an information science!  As
> > part of that, I have taken it upon myself to investigate Sage for
> > possible inclusion in some of our modules.  The students could start
> > an account and work through some preset presentations and then inquire
> > and investigate on their own.  I think it would be great for them and
> > they would learn some programming too (much as I am now).
>
> In that case, you might be glad to know that Marshall Hampton is
> updating Biopython as an optional package of Sage. Biopython is a
> Python package for research and study in bioinformatics. Its website
> is
>
> http://biopython.org/wiki/Main_Page
>
> and the ticket to update Biopython in Sage is
>
> http://trac.sagemath.org/sage_trac/ticket/6634
>
> --
> Regards
> Minh Van Nguyen
--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: Title a Digraph

2009-08-18 Thread Jason Grout

docfleetwood wrote:
> Very cool - thanks for the info.  A nice teaser.  When is Sage 5.0
> coming out :-)
> 


Well, as always, "implement it and send a patch" :).

-Jason


--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---