Script for Stress on global coordinates system

Hello, I´m trying to extract the stress components on global coordinates using a .py script but I was not bale to do it so far. I only could get the "S11", etc components. Is there a way I can get the stress tensor components on global coord. system?