[sage-support] Re: Umlauts in Notebook cells do not work (encoding problem)

2008-04-12 Thread Lars Fischer

Hello,

after reading Use Sage, not PowerPoint by Hector Villafuerte I created
a worksheet on
www.sagenb.org
with title TheUmlautProblem and published it.

It shows what happens and it happens also on sagenb. So I think it is
not related to our server. And someone with admin rights can examine
if there is a problem with the file created for the cells.

Please note that before I published the worksheet the Ü in the cells
were a Ü, after publishing, the Ü look like
� in the published document.

My workflow was
New worksheet
Edit, and I inserted everything in the Edit-Field.
Use, and evaluate the first two cells.
Then I published.



The content of the worksheet after a click on Edit should be:

TheUmlautProblem
system:sage

h1The Umlaut Problem/h1
pI really want to use umlauts like Ä,Ö,Ü, ä,ö,ü and ß inside Strings
and comments./p

{{{id=0|
print Ü
///
Traceback (most recent call last):
  File stdin, line 1, in module
UnicodeDecodeError: 'utf8' codec can't decode byte 0xdc in position 0:
unexpected end of data
}}}

{{{id=1|
print Ue #print Ü
///
Traceback (most recent call last):
  File stdin, line 1, in module
UnicodeDecodeError: 'utf8' codec can't decode byte 0xdc in position 0:
unexpected end of data
}}}

{{{id=3|

///
}}}

With best regards,
Lars Fischer
--~--~-~--~~~---~--~~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: Umlauts in Notebook cells do not work (encoding problem)

2008-04-12 Thread Lars Fischer

Hello Michael,

thanks for your answer.

On Apr 12, 1:40 pm, mabshoff [EMAIL PROTECTED]
dortmund.de wrote:
 Mmmh, the UTF8 in notebook cell bug was supposed to be fixed by #2399
 which was merged in 2.10.3.rc3. It sounds like the problem is in the
 publishing step, so this sounds like you hit another bug. We will open
 a ticket once we have narrowed this down to what the issue is. Thanks
 for reporting this.

See my screenshot from the first post, the intermediate files on our
server have the encoding hint. It is a 2.11 version. I think there is
some copying involved somewhere.

My unqualified guess is that the write (around line 1380 in
worksheet.py)

# This magic comment at the very start of the file allows
utf8
# characters in the file
input = '# -*- coding: utf_8 -*-\n' + input
open(tmp,'w').write(input)

could be the reason. Perhaps some encode or decode input to ascii or
unicode. Or set the encoding of the opened file object before write.

The bug is not only in the publishing step. It also does not work for
unpublished worksheets. I suppose the intermediate files for each cell
are created in a not unicode aware way.

With best regards,
Lars Fischer

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



[sage-support] Re: Umlauts in Notebook cells do not work (encoding problem)

2008-04-12 Thread Martin Albrecht

This is now tracked at:

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

Cheers,
Martin


-- 
name: Martin Albrecht
_pgp: http://pgp.mit.edu:11371/pks/lookup?op=getsearch=0x8EF0DC99
_www: http://www.informatik.uni-bremen.de/~malb
_jab: [EMAIL PROTECTED]


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



[sage-support] Re: pylab inside notebook

2008-04-12 Thread Fabio Tonti
Thank you! Unfortunately I think you are also right with your last
assumption. It just looks like an empty plot.
As a consequence, I tried this example with the new knoboo spkg, but here
is what I get:

from pylab import *

Traceback (most recent call last):
  File input, line 1, in module
  File
/home/fabio/sage-2.11-debian32-intel-i686-Linux/local/lib/python2.5/site-packages/pylab.py,
line 1, in module
from matplotlib.pylab import *
  File
/home/fabio/sage-2.11-debian32-intel-i686-Linux/local/lib/python2.5/site-packages/matplotlib/pylab.py,
line 197, in module
from cbook import flatten, is_string_like, exception_to_str, popd, \
  File
/home/fabio/sage-2.11-debian32-intel-i686-Linux/local/lib/python2.5/site-packages/matplotlib/cbook.py,
line 8, in module
import numpy as npy
  File
/home/fabio/sage-2.11-debian32-intel-i686-Linux/local/lib/python2.5/site-packages/numpy/__init__.py,
line 43, in module
import linalg
  File
/home/fabio/sage-2.11-debian32-intel-i686-Linux/local/lib/python2.5/site-packages/numpy/linalg/__init__.py,
line 4, in module
from linalg import *
  File
/home/fabio/sage-2.11-debian32-intel-i686-Linux/local/lib/python2.5/site-packages/numpy/linalg/linalg.py,
line 25, in module
from numpy.linalg import lapack_lite
ImportError: liblapack.so: cannot open shared object file: No such file or


Should I open a new thread about this error? (I'm not sure how spkgs are
handled)

Best wishes, Fabio

On Sat, Apr 12, 2008 at 6:24 PM, Carl Witty [EMAIL PROTECTED] wrote:


 On Apr 8, 4:34 am, Fabio Tonti [EMAIL PROTECTED] wrote:
  sage: from pylab import *
  sage: imshow([[(0,0,0)]])
  sage: savefig('foo.png')
  Traceback (most recent call last):
  ...
  NameError: global name 'npy' is not defined
 
  I would just like to make an image from a 2-dimensional Array (of
  rgb-values)!

 This is a bug in our current version of matplotlib; it is being
 tracked here: http://trac.sagemath.org/sage_trac/ticket/2900

 For now, it looks like you may be able to work around the problem by
 using RGBA 4-tuples instead of RGB 3-tuples; that is, add an extra ,
 255 on the end of each pixel.

 You also need to be sure to use Python ints instead of Sage integers.
 So with the commands:
 sage: imshow([[(0r,0r,0r,255r)]])
 sage: savefig('foo.png')
 I at least don't get any more exceptions, and I do get a saved image.
 However, I don't see a black pixel in the saved image, so it may not
 actually be working.

 Carl
 


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



[sage-support] Re: forgot sagenb password

2008-04-12 Thread William Stein

On Sat, Apr 12, 2008 at 10:40 AM, pong [EMAIL PROTECTED] wrote:

  I forgot my sage account password so I couldn't it from www.sagenb.org.
  And I couldn't find any way to recover the password or create a new
  one. Can someone tell me what can I do in this case?


What is your login name?

William

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



[sage-support] Re: notebook and javascript question

2008-04-12 Thread gerhard

 a really simple problem related to the above problem

It all comes down to being able to have sage
print an html('string') to the notebook,
and having the page refresh without having the user
cause an event, (e.g., by pressing shift-enter).

Another example might be GeoGebra: It has
a javascript interface. Suppose the notebook programmer
wants a sage function that updates the display
at intermediate stages of some computation.

thank you,
-gerhard


PS., I have since found that the Google Maps API is
able to load a .kml file. I suppose I could write a hack:
Have a javascript with a timer that periodically reloads
this file, while having the sage code updating the file!

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



[sage-support] Re: forgot sagenb password

2008-04-12 Thread pong

William,

My login name is wpong


On Apr 13, 4:29 am, William Stein [EMAIL PROTECTED] wrote:
 On Sat, Apr 12, 2008 at 10:40 AM, pong [EMAIL PROTECTED] wrote:

   I forgot my sage account password so I couldn't it fromwww.sagenb.org.
   And I couldn't find any way to recover the password or create a new
   one. Can someone tell me what can I do in this case?

 What is your login name?

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



[sage-support] Re: notebook and javascript question

2008-04-12 Thread Jason Grout

William Stein wrote:
 On Sat, Apr 12, 2008 at 4:55 PM, gerhard [EMAIL PROTECTED] wrote:
   a really simple problem related to the above problem

  It all comes down to being able to have sage
  print an html('string') to the notebook,
  and having the page refresh without having the user
  cause an event, (e.g., by pressing shift-enter).
 
 Could you give a *really concrete* but simple example which we
 could focus on?   Thanks!


Is this a relevant example?


running this in the notebook:

for i in range(5):
 print html('scriptalert(%s)/script'%i)
 sleep(1)

should pop up a dialog box every second.

Is that an example of what you want, gerhard?

Jason


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



[sage-support] Re: forgot sagenb password

2008-04-12 Thread William Stein

On Sat, Apr 12, 2008 at 5:50 PM, pong [EMAIL PROTECTED] wrote:

  William,

  My login name is wpong


I can't find any information about a user with the name wpong for the public
sage notebook:

[EMAIL PROTECTED]:~$ find . -name *pong* -print
./nb1/sage_notebook/worksheets/spongmaster

In fact, the only user with a similar name seems to be spongmaster.

Is there another possible login name that you used?




  On Apr 13, 4:29 am, William Stein [EMAIL PROTECTED] wrote:
   On Sat, Apr 12, 2008 at 10:40 AM, pong [EMAIL PROTECTED] wrote:
  
 I forgot my sage account password so I couldn't it fromwww.sagenb.org.

And I couldn't find any way to recover the password or create a new
 one. Can someone tell me what can I do in this case?
  
   What is your login name?
  
   William


 




-- 
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: forgot sagenb password

2008-04-12 Thread Timothy Clemans

Did you use sagenb.com before it pointed to https://www.sagenb.org?

On Sat, Apr 12, 2008 at 5:55 PM, William Stein [EMAIL PROTECTED] wrote:

  On Sat, Apr 12, 2008 at 5:50 PM, pong [EMAIL PROTECTED] wrote:
  
William,
  
My login name is wpong
  

  I can't find any information about a user with the name wpong for the public
  sage notebook:

  [EMAIL PROTECTED]:~$ find . -name *pong* -print
  ./nb1/sage_notebook/worksheets/spongmaster

  In fact, the only user with a similar name seems to be spongmaster.

  Is there another possible login name that you used?




  
On Apr 13, 4:29 am, William Stein [EMAIL PROTECTED] wrote:
 On Sat, Apr 12, 2008 at 10:40 AM, pong [EMAIL PROTECTED] wrote:

   I forgot my sage account password so I couldn't it 
 fromwww.sagenb.org.
  
  And I couldn't find any way to recover the password or create a new
   one. Can someone tell me what can I do in this case?

 What is your login name?

 William
  
  
   
  



  --
  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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~--~~~~--~~--~--~---



[sage-support] Re: forgot sagenb password

2008-04-12 Thread William Stein

On Sat, Apr 12, 2008 at 7:55 PM, Jason Grout
[EMAIL PROTECTED] wrote:

  William Stein wrote:
   On Sat, Apr 12, 2008 at 6:48 PM, pong [EMAIL PROTECTED] wrote:
William,


   I am sorry for the inconvenient caused but is there an automatic
system that take care of that. I suppose as the number of users grow,
this will become a rather common problem.
  
   I'll need to hire a notebook admin :-)


  Or outsource the public notebook :)

Great idea.  When do you want to start serving it on your servers and
administering it?
Let me know where I should point sagenb.org at :-)

 -- William

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



[sage-support] Re: labeling graphs

2008-04-12 Thread William Stein

On Sat, Apr 12, 2008 at 8:22 PM, pong [EMAIL PROTECTED] wrote:

  I want to label several curves on a graph, say y=x^2 and y=x^3-5, with
  the labeling appear next to the curve.
  I know I can use text('y=x^2',...) to achieve that. But how can I use
  the nice form i.e. x (superscript 2) instead of x^2? I couldn't find
  any example of this kind for instance in sage_for_newbies.

This might work for you:

   text('$x^2$', (3,3), rgbcolor='black',  fontsize=20  )

William

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



[sage-support] Re: labeling graphs

2008-04-12 Thread pong

Sweet! It works perfectly. Thanks.

On Apr 13, 11:24 am, William Stein [EMAIL PROTECTED] wrote:
 On Sat, Apr 12, 2008 at 8:22 PM, pong [EMAIL PROTECTED] wrote:

   I want to label several curves on a graph, say y=x^2 and y=x^3-5, with
   the labeling appear next to the curve.
   I know I can use text('y=x^2',...) to achieve that. But how can I use
   the nice form i.e. x (superscript 2) instead of x^2? I couldn't find
   any example of this kind for instance in sage_for_newbies.

 This might work for you:

text('$x^2$', (3,3), rgbcolor='black',  fontsize=20  )

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