Xlator question

Hi John

I am using the Xlator class from matplotlib.cbook to parse equations in python syntax for showing with mathtext. on all my equations I have terms of the kind:

y[1], y[2], etc.

I would like to create an entry in the translation dictionary that would translate these strings to:

y_1, y_2, etc,

How could I do this? The point is I want to preserve the number on these strings.

I know this is more of a Python question but I would greatly appreciate any help…

Flávio Codeço Coelho, PhD

Programa de Computação Científica

Fundação Oswaldo Cruz

Rio de Janeiro – Brasil