On Thu, 28 Aug 2008, MB wrote:

>
> I'm converting over from mathematica to Sage.  One thing I need to do
> is write a large number of expressions to an ASCII file as C code, or
> something reasonably close.  Mathematica has the CForm[] operator for
> this, which doesn't quite make C code but is pretty close.
>
> In Sage, I tried writing str(expression) to a file, but it doesn't
> just print a flat expression.  Rather, it tries to make it look
> pretty, which makes it unusable for automatic code generation.
>
> Does anyone have an idea how to do this?

This hasn't been implemented in great generality yet, but try writing 
repr(expression) rather than str(expression).

- Robert


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