On 02/24/2012 08:15 PM, Aaron Meurer wrote:
You mean the print statement?  That works by calling str() on the
arguments.  So you'll want to override __str__, or extend the
StrPrinter.

In Python 3, of course, you can just override the print() function.

Aaron Meurer

On Fri, Feb 24, 2012 at 11:05 AM, Alan Bromborsky<abro...@verizon.net>  wrote:
On 02/24/2012 12:18 PM, Alan Bromborsky wrote:
On 02/24/2012 11:31 AM, Alan Bromborsky wrote:
What would be the best way of modifying the printing behavior of
functions and derivatives without modifying the core?

I found the tutorial on modifying printers.  No reply needed.

I spoke too soon.  To use new printer model interactively

sys.displayhook = GAprint

works.  But how do you get print to use GAprint in a script
(noninteractivley)?


--
You received this message because you are subscribed to the Google Groups
"sympy" group.
To post to this group, send email to sympy@googlegroups.com.
To unsubscribe from this group, send email to
sympy+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/sympy?hl=en.

Thank you, googling StrPrinter gave me the right link to how to do it.

--
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To post to this group, send email to sympy@googlegroups.com.
To unsubscribe from this group, send email to 
sympy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sympy?hl=en.

Reply via email to