[sage-support] Re: How to cimport a Sage extension class?

2009-05-08 Thread simon . king

Hi Georg,

On May 7, 8:21 pm, gsw georgswe...@googlemail.com wrote:
 I ran into all these problems half a year ago

Yes, I was surprised that it wasn't properly documented, although it
looks like a pretty standard problem.

 In the end Michael (Abshoff) got so
 distracted from more important work, that I decided to let the topic
 go for a while (see the history of trac #4857).

And see the related/derived ticket #5990

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: strange characters in notebook

2009-05-08 Thread gyro

On May 7, 5:11 pm, mabshoff michael.absh...@mathematik.uni-
dortmund.de wrote:
 On May 7, 6:05 am, gyro gyromagne...@gmail.com wrote:

 This is usually an indicator of ASCII escape sequences. Any chance you
 have played with say custom IPython settings?

 Cheers,

 Michael

Hi Michael,
I don't think so. Is there a way to 'clear' any such setting to make
sure?

-gyro
--~--~-~--~~~---~--~~
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: problem with sage-vmware 3.4.1 on windows xp

2009-05-08 Thread Alessandro Torre

Any news?
Do you think you will need me for future testing or can I delete the
bugged vmware image?
And how are things going?
Have you solved the problem?

Cheers
A.

On 5 Mag, 12:13, Alessandro Torre adessobastadavv...@gmail.com
wrote:
 Hi.

 disassemble.txt does contain the output from disassemble $pc
 +32,$pc-32

 Instead disassemble $pc+32 $pc-32 produces no output:

 Dump of assembler code from 0xb76ce853 to 0xb76ce813:
 End of assembler dump.

 And the output of disassemble $pc-32 $pc+32:

 Dump of assembler code from 0xb76ce813 to 0xb76ce853:
 0xb76ce813 __gmpz_set_str+451:  rorl   $0x31,-0x378ad42a(%ecx)
 0xb76ce81a __gmpz_set_str+458:  rclb   %cl,0x56(%edx)
 0xb76ce81d __gmpz_set_str+461:  fildll (%esp)
 0xb76ce820 __gmpz_set_str+464:  add    $0x8,%esp
 0xb76ce823 __gmpz_set_str+467:  mov    0x10(%ebp),%edi
 0xb76ce826 __gmpz_set_str+470:  lea    (%edi,%edi,4),%edx
 0xb76ce829 __gmpz_set_str+473:  mov    -0x2c(%ebx),%eax
 0xb76ce82f __gmpz_set_str+479:  fdivl  0x4(%eax,%edx,4)
 0xb76ce833 __gmpz_set_str+483:  fisttpl -0x20(%ebp)
 0xb76ce836 __gmpz_set_str+486:  mov    -0x20(%ebp),%eax
 0xb76ce839 __gmpz_set_str+489:  lea    0x1f(%eax),%edx
 0xb76ce83c __gmpz_set_str+492:  cmp    $0x,%eax
 0xb76ce83f __gmpz_set_str+495:  cmovle %edx,%eax
 0xb76ce842 __gmpz_set_str+498:  sar    $0x5,%eax
 0xb76ce845 __gmpz_set_str+501:  add    $0x2,%eax
 0xb76ce848 __gmpz_set_str+504:  mov    -0x3c(%ebp),%edx
 0xb76ce84b __gmpz_set_str+507:  cmp    (%edx),%eax
 0xb76ce84d __gmpz_set_str+509:  jg     0xb76ce917 __gmpz_set_str
 +711
 End of assembler dump.

 I hope that's all.

 Cheers
--~--~-~--~~~---~--~~
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: How to work properly with sage

2009-05-08 Thread Ton Biegstraaten





William Stein schreef:

  On Tue, May 5, 2009 at 12:56 AM, Ton Biegstraaten
ton.biegstraa...@gmail.com wrote:
  
  
Hi,
I like to have some advice on how to develop my own code and have a
proper documentation for it.
In python all is clear, you write a .py file and supply the docstring
with proper reST text and code for epydoc, doctest and/or Sphinx. With
nzmath you can do a lot of math things (and it works also on my phone :-)

  
  
Why is the above senence about nzmath here?  It seems like a
subliminal message.
  

I removed some sentences before this one, but this one remained It
hasn't anything to do with the actual question.

  
  
  
Sage uses .sage files and worksheets, and the way to document is
described in the development manual.

  
  
You can also just write Python code (with a .py extension) and put

   import sage.all

at the top of your file, then use Sage functions via "sage.all".
Then everything
is just like you describe with Python above.
  

Well, not quite actually. The manual says define a SAGE_ROOT, but
that's not enough also.
I found http://wiki.sagemath.org/Sage_in_systemwide_python , but that
example also gives an error. When I added an environment variable
SAGE_DOC (the error was complaining about not finding it) it worked
(using the LD_LIBRARY_PATH line).


thanks,
Ton Biegstraaten

--~--~-~--~~~---~--~~
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] Upgrading Sage Notebook

2009-05-08 Thread IanSR

How do I copy users from one sage Notebook to another Sage Notebook?
Once I have done this, can I just copy the worksheets directory over
to get access to all the old worksheets?

Ian
--~--~-~--~~~---~--~~
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: Upgrading Sage Notebook

2009-05-08 Thread Ian Stokes-Rees

And a follow on: I am regularly coming up against the problem of
having some cookie which results in an error page when I go to Sage.
I have to delete all cookies for my server to correct this.  Is there
some way to avoid this situation?  I thought it was my upgrade that
was causing the problems (incompatible worksheets), hence the desire
to start from scratch and move the user DB and worksheets over.  It
looks like the real cause of the problem was this cookie situation.

Ian
--~--~-~--~~~---~--~~
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] Using sage code from within Python

2009-05-08 Thread Ton Biegstraaten

Hi,

In the following code a.taylor works both when using load and starting 
it with python, b.taylor works with load within sage but gives the 
exception when using python. There is no difference when using the 
python version from the sage tree.
I removed superfluous python code. The code is the generating function 
for a unordered partition.
---
# be sure sage can be found when using Python
# comment it when starting from within sage with load
from sagePaths import *
set_paths()
#
from sage.all import *
from operator import *

if __name__ == __main__:
var('x')
a = prod([1/(1-x**i) for i in range(1, 8)])
b = prod([1/(1-x**i) for i in range(1, 9)])
print a.taylor(x,0,5)
print b.taylor(x,0,5)

 Result when using python:
54 32
   7 x  + 5 x  + 3 x  + 2 x  + x + 1
Traceback (most recent call last):
  File TaylorError.py, line 14, in module
print b.taylor(x,0,5)
  File 
/home/ton/Downloads/sage-3.4/local/lib/python2.5/site-packages/sage/calculus/calculus.py,
 
line 2562, in taylor
l = self._maxima_().taylor(v, SR(a), Integer(n))
  File 
/home/ton/Downloads/sage-3.4/local/lib/python2.5/site-packages/sage/calculus/calculus.py,
 
line 1345, in _maxima_
return RingElement._maxima_(self, maxima)
  File sage_object.pyx, line 312, in 
sage.structure.sage_object.SageObject._maxima_ 
(sage/structure/sage_object.c:3331)
  File sage_object.pyx, line 252, in 
sage.structure.sage_object.SageObject._interface_ 
(sage/structure/sage_object.c:2390)
  File 
/home/ton/Downloads/sage-3.4/local/lib/python2.5/site-packages/sage/interfaces/expect.py,
 
line 1002, in __call__
return cls(self, x, name=name)
  File 
/home/ton/Downloads/sage-3.4/local/lib/python2.5/site-packages/sage/interfaces/expect.py,
 
line 1377, in __init__
raise TypeError, x
TypeError: Error executing code in Maxima
CODE:
type 'str'
Maxima ERROR:
emp/E8310_Ton/19933//interface//tmp19933-14731516);1+453570942;
sage-displaysage-display
Could not find 
`~/.sage//temp/E8310_Ton/19933//interface//tmp19933-14731516' using 
paths in file_search_maxima.

sage-display
(%o37)
-

Any ideas?

regards
Ton Biegstraaten

--~--~-~--~~~---~--~~
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: Upgrading Sage Notebook

2009-05-08 Thread William Stein

On Fri, May 8, 2009 at 11:55 AM, IanSR ijsto...@alumni.uwaterloo.ca wrote:

 How do I copy users from one sage Notebook to another Sage Notebook?

Sage-4.0 will support download/upload all worksheets to a zip file
functionality.

 Once I have done this, can I just copy the worksheets directory over
 to get access to all the old worksheets?




 Ian
 




-- 
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: Upgrading Sage Notebook

2009-05-08 Thread William Stein

On Fri, May 8, 2009 at 12:06 PM, Ian Stokes-Rees
ijsto...@alumni.uwaterloo.ca wrote:

 And a follow on: I am regularly coming up against the problem of
 having some cookie which results in an error page when I go to Sage.
 I have to delete all cookies for my server to correct this.
 Is there
 some way to avoid this situation?  I thought it was my upgrade that
 was causing the problems (incompatible worksheets), hence the desire
 to start from scratch and move the user DB and worksheets over.  It
 looks like the real cause of the problem was this cookie situation.

That sounds like a bug.

 -- 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: Upgrading Sage Notebook

2009-05-08 Thread mabshoff



On May 8, 4:00 pm, William Stein wst...@gmail.com wrote:
 On Fri, May 8, 2009 at 11:55 AM, IanSR ijsto...@alumni.uwaterloo.ca wrote:

  How do I copy users from one sage Notebook to another Sage Notebook?

 Sage-4.0 will support download/upload all worksheets to a zip file
 functionality.

That patch was merged in Sage 3.4.2, but it is only active when the
creation of accounts is disabled.

  Once I have done this, can I just copy the worksheets directory over
  to get access to all the old worksheets?

  Ian

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

Cheers,

Michael
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---