answered 12 years ago
This ticket makes that printing facility more general: http://trac.sagemath.org/sage_trac/ticket/14040
It's not in Sage yet, but I think it would make your objective much easier to obtain.