Hi Laurent,
1.) use
#! /usr/bin/env sage-python
using /usr/bin/env is the recommended and more portable way on unix
systems, also for bash scripts (#! /usr/bin/env bash),
the interpreter of this script will now be the python interpreter/
distribution shipped with sage (which is actually independent of sage)
to have all sage commands available in this script type
import sage.all
now you still have to be aware that no preparsing is taking place,
which means for example that literal integers will be of type <int>
and not of type <Integer> like in sage directly, and another example,
that 2^3 does not mean 2 to the power 3, but 2 xor 3, you would have
to write 2**3 instead, ...
if you want the script interpreted by sage directly you have to type
#! /usr/bin/env sage
where, of course, the sage root directory has to be in your PATH, in
this case preparsing is performed and 2^3 means what you actually
want...
2.) I'm sorry, I can't answer this question, I'm curious for the
answer, too, because this is exactly the same problem I'm searching a
solution for, hopefully someone else will answer this
best regards,
Georg
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
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
-~----------~----~----~----~------~----~------~--~---