[sage-devel] Re: Converting a symbolic expression to python code

2011-12-12 Thread John H Palmieri
On Monday, December 12, 2011 5:13:00 PM UTC-8, Michael Orlitzky wrote: Is there an easy way to print a symbolic expression so that it's valid python code? E.g. 2*x^2 -- QQ(2) * x**QQ(2) How about sage: preparse('2*x^2') 'Integer(2)*x**Integer(2)' -- John -- To post to

Re: [sage-devel] Re: Converting a symbolic expression to python code

2011-12-12 Thread Michael Orlitzky
On 12/12/2011 10:05 PM, John H Palmieri wrote: On Monday, December 12, 2011 5:13:00 PM UTC-8, Michael Orlitzky wrote: Is there an easy way to print a symbolic expression so that it's valid python code? E.g. 2*x^2 -- QQ(2) * x**QQ(2) How about sage: preparse('2*x^2')