### Using SageMath Finite Field Extension on Python.

Yes, I want to the reverse, use the SageMath in Python.

I've seen this on ask.sagemath and stackoverflow

I want to use this in Python

```
k = GF(2)
R.<x> = k[]
k.extension(x^1000 + x^5 + x^4 + x^3 + 1, 'a')
```

~~from sage.all import *~~The python code

```
from sage.all import *
F = GF(2)
R.<x> = k[]
K = F.extension(x^4 + x + 1, 'a')
print(K)
```

the `R.<x> = k[]`

fails...

Is there a way to do this in python?

My final aim is finding the multiplicative inverse of an element using python with the sagemath import.