How to build a new printer

0 views
Skip to first unread message

Christophe

unread,
Jul 4, 2009, 10:49:05 AM7/4/09
to sy...@googlegroups.com
Hello,
I would like to add a minor change in the printer. Instead of [[1,2,3],
[a,b,c]], I would like to have mat(1;2;3 & a;b;c).

I just want to have a simple example showing of how to make a new printer.

Best regards.
Christophe

Luke

unread,
Jul 4, 2009, 6:28:10 PM7/4/09
to sympy
Christophe,
I just made an example of how to create a new printer. It isn't on
docs.sympy.org yet, but it should when the next release happens. In
the mean time, you can look at the code in the git repository:

http://git.sympy.org/?p=sympy.git;a=blobdiff;f=sympy/printing/printer.py;h=40a8853b71e4642981096b463d46da7392fcae76;hp=587b44af846bbb76ef218559666a0f3635a88c1b;hb=0ffaf649242f4876c591158d19f33a6b0b17ee0b;hpb=162e518e9e28403ba78d27b523e946beefa4d47e

Hopefully this will give you an idea of what you need to do to
customize your printer.

~Luke

Christophe

unread,
Jul 5, 2009, 5:25:01 AM7/5/09
to sy...@googlegroups.com
Luke a écrit :

> Christophe,
> I just made an example of how to create a new printer. It isn't on
> docs.sympy.org yet, but it should when the next release happens. In
> the mean time, you can look at the code in the git repository:
>
> http://git.sympy.org/?p=sympy.git;a=blobdiff;f=sympy/printing/printer.py;h=40a8853b71e4642981096b463d46da7392fcae76;hp=587b44af846bbb76ef218559666a0f3635a88c1b;hb=0ffaf649242f4876c591158d19f33a6b0b17ee0b;hpb=162e518e9e28403ba78d27b523e946beefa4d47e
>
> Hopefully this will give you an idea of what you need to do to
> customize your printer.
Very intersting and easy to understand. Will you put a complete example,
or not ?

Christophe

Ondrej Certik

unread,
Jul 7, 2009, 1:48:17 AM7/7/09
to sy...@googlegroups.com

Yes, I think he will (or not? :). Otherwise a complete example is in pydy.

Ondrej

Reply all
Reply to author
Forward
0 new messages