On Wed, Nov 2, 2011 at 3:22 AM, Laurent <[email protected]> wrote:
>> Hi,
>>
>> I think its a issue of parsing. If your file is called hello.py it
>> gives the errors you mentioned. However if you call your file
>> hello.sage it works. If you call your file hello.sage and run
>>
>> sage hello.sage
>>
>> it generates a hello.py which I append below -
>
> I know that, but I never understood how to use it because if my file is
> named hello.sage, I cannot do
> import hello.sage
> in an other file. But if it is named hello.py, I can write
> import hello
>
> I admit I never got trough the doc about that issue ;)

.sage files are not meant to be used like normal Python modules.  You
can only load or attach them.  I implemented this in 2005, when I was
basically "implementing something like Magma" on top of Python.  I'm not sure
this is good or bad, but I definitely find

   sage: attach file.sage

to be *useful* in practice.

William

>
> Laurent
>
> --
> 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
> URL: http://www.sagemath.org
>



-- 
William Stein
Professor of Mathematics
University of Washington
http://wstein.org

-- 
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
URL: http://www.sagemath.org

Reply via email to