# Import class using mathematica

I have a class a in a file a.sage using the interface to mathematica. I want to use this class in another class b. One way I found was to run first "mv a.sage a.py", which generates a python file. But then I get the error: "NameError: global name 'mathematica' is not defined" because you cannot use mathematica in python as you can use it with sage.

Is there a way importing a self-written class (a.sage) using mathematica in another self-written class (b.sage)?

This would be a problem with anything similar, not just that particular interface. You may want to try

`from sage.all import *`

at the top of your`.py`

file ...