File imports for polynomial rings in sage

 0 If i type in the following R. asked Aug 19 '10 ae 1

 2 I agree, this is hard to read (probably a candidate for "What is broken on this site"). Having said that, I think the question is: What module do I need to import in my .py file so that the above syntax works as expected? I guess I don't know this answer, but maybe a workaround: The .< > notation is a shortcut for R = PolynomialRing(ZZ,2,'z1,z2') (z1,z2) = R.gens() and the latter works when loaded from a .py file. posted Aug 19 '10 niles 3354 ● 5 ● 38 ● 92 http://nilesjohnson.net/
 1 The answer; it is impossible to make the notation: R. = ZZ[]  work in a .py file, since .py files must be valid Python, and the above isn't. The workaround by niles above is the way to go. posted Aug 19 '10 William Stein 1195 ● 5 ● 17 ● 40 http://wstein.org/ Oh, to use the PolynomialRing command in a .py file, do from sage.rings.all import PolynomialRing William Stein (Aug 19 '10)
 0 Could you please edit your question? There are html escaping errors in it. Notice the ampersand gt semicolon? I see the command, but I don't see a question mark or a question in what you originally typed. Thanks. posted Aug 19 '10 ccanonc 477 ● 3 ● 15 ● 32 I tried to edit and get a big traceback -- there my thus be a bug in askbot that prevents editing some posts. William Stein (Aug 19 '10)

[hide preview]

Stats:

Asked: Aug 19 '10

Seen: 82 times

Last updated: Aug 19 '10