On Tue, Apr 28, 2009 at 3:14 AM,  <simon.k...@uni-jena.de> wrote:
>
> Dear Sajan.S,
>
> On Apr 28, 6:31 am, "Sajan.S" <ammasa...@gmail.com> wrote:
>> Dear sir,
>>
>> P.< y0, y1, x0, x1> = PolynomialRing(GF(3),4,order='lex');
>>
>> is working in interactive python shell.
>>
>> but not working in python script file executed at command prompt

You could also try naming your script  something.sage, then loading it
into sage using

   sage: load something.sage

William

>
> This is because the interactive shell has a preparser. Here you can
> see what the preparser returns when you type your command in the
> interactive shell:
>
> sage: preparse("P.< y0, y1, x0, x1> = PolynomialRing(GF(3),
> 4,order='lex')")
> "P = PolynomialRing(GF(Integer(3)),Integer(4),order='lex', names=
> ('y0', 'y1', 'x0', 'x1',)); (y0, y1, x0, x1,) = P._first_ngens(4)"
>
> Python only sees the output of the preparser. In your script, you can
> provide this output, and it will work.
>
> Best regards,
>     Simon
> >
>



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

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support-unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to