Hi Laurent,
On Thu, Jun 4, 2009 at 3:51 AM, moky <[email protected]> wrote:
>
> Hello
>
>
> I would like to define a constant function in a script.
You might want to try just putting the code in a some text file whose
extension is ".sage". For example, I put the following code in a file
called "demo.sage", not "demo.py":
[mv...@sage ~]$ cat demo.sage
x = var("x")
f(x)= 8
print f.derivative()
type(f)
Then I use Sage to execute the script like so:
[mv...@sage ~]$ sage demo.sage
x |--> 0
<SNIP>
--
Regards
Minh Van Nguyen
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---