On Fri, Feb 22, 2008 at 10:03 AM, John Palmieri <[EMAIL PROTECTED]> wrote:
>
>
>
>  On Feb 22, 8:47 am, "William Stein" <[EMAIL PROTECTED]> wrote:
>  > On Fri, Feb 22, 2008 at 12:50 AM, Simon King
>  >
>  >
>  >
>
>
> > <[EMAIL PROTECTED]> wrote:
>  >
>  > >  Dear William,
>  >
>  > >  On Feb 22, 1:58 am, "William Stein" <[EMAIL PROTECTED]> wrote:
>  > >  > >  If I rename it to tensor.sage (not sure if this is a good idea),
>  >
>  > >  > Yes, that's a VERY GOOD idea.  It's really crazy to use a compiled
>  > >  > spyx for the purposes of interfacing with the Singular interpreter
>  > >  > via pexpect.
>  >
>  > >  Sorry, using a compiled spyx was just, well, let's call it my personal
>  > >  tradition.
>  >
>  > >  Am i right that the loop must be re-written if it is .sage rather
>  > >  than .spyx?
>  > >  I think
>  >
>  > >    for i from 1<=i<=len(L[2]):
>  > >  is only possible in .spyx, while in .sage it should be
>  > >    for i in range(1,len(L[2])+1)
>  >
>  > Yes, that is correct.   But when you're not working with pure C data 
> structures
>  > you're going to get no speed improvements by using
>  >
>  > >    for i from 1<=i<=len(L[2]):
>  > instead of
>  > >    for i in range(1,len(L[2])+1)
>  >
>  > You're just making things a little more difficult.
>  >
>  > >  @John, this would explain the new error message after renaming the
>  > >  file.
>  >
>  > Yes, that would.
>  >
>  >
>  >
>  > >  However, i don't know why attaching the .spyx didn't work.
>  >
>  > That's very suspicious:
>  >
>  > "sage: attach tensorpower.spyx
>  > Loading of file "/Users/palmieri/.sage/tensorpower.spy" has type not
>  > implemented."
>  >
>  > That suggests there is either a very very weird serious bug that got
>  > magically fixed
>  > or maybe the above log isn't what really happened -- notice that in
>  > the error message
>  > it says .spy not  .spyx.
>
>  Right, I'm confused by that, too, but that's what it says.  I just
>  took the new file tensorpower.sage that Simon sent me, copied it to
>  tp.spyx, and did the following (in a new worksheet).
>
>  sage: attach tp.spyx
>  Loading of file "/home/palmieri/.sage/tp.spy" has type not
>  implemented.
>  sage: attach tensorpower.sage
>  sage: R=singular.ring(2,'(x1,x12,x2)','dp')
>
> sage: D=singular.matrix(3,3,'0,0,-x12, 0,0,0, 0,0,0')
>  sage: S=singular.nc_algebra(1,D)
>  sage: S
>  //   characteristic : 2
>  //   number of vars : 3
>
> //        block   1 : ordering dp
>  //                  : names    x1 x12 x2
>  //        block   2 : ordering C
>  //   noncommutative relations: ...
>
>  This is with Sage 2.9.3 on the linux box in my office, and I had a
>  similar problem with Sage 2.10.1 on my mac at home.
>
>  ...
>
>  Now, after trying one or two more things, here's more information: if
>  I start sage from a terminal, then type "attach tp.spyx", I get an
>  error about not being able to find the file (which makes sense, since
>  I put the file in ~/.sage/, not in my home directory). Then I type
>  "notebook()", go to my web browser, and do the stuff I pasted in
>  above.  Then I quit that, go back to the terminal, hit ctrl-C twice,
>  and do "attach tp.spyx".  This time it works: typing "notebook()" and
>  then quitting it seems to change my default directory from ~/ to
>  ~/.sage/.
>
>  So, anyway, it seems that I can attach .spyx files from the terminal
>  session, but not from a notebook in a web browser.

To attach files in a *local* notebook give the exact path to the file.

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

Reply via email to