Hello,

When you call, ./example.sage, it is being run by the Python
interpreter with no preparsing done at all.  Thus, 2^3 corresponds is
interpreted as Python interprets it (not exponentiation).  When you do
"load example.sage", then it is preparsed by Sage, and your '^' gets
changed to a "**" in the background.  When it is preparsed, you should
be able to find an example.py file which can then be run by a normal
Python interpreter.

--Mike

On Jan 18, 2008 11:55 AM, Georg <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> following script example.sage (sage-2.9.3):
>
> #!/usr/bin/env sage-python
> print 2^3
> print 2**3
>
> outputs:
> $ ./example.sage
> 1
> 8
>
> while
>
> sage:load "example.sage"
> 8
> 8
>
> works as expected.
>
> Is this a bug or something one should consider when writing sage
> scripts?
> Or is it due to the problem that "#!/usr/bin/env sage -python" as
> first line (note the space between sage and -python) does not work on
> my system (Debian Etch)...
>
> thanks, Georg
>
>
>
> >
>

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