Tour of the Python Interface

Contents

Tour of the Python Interface#

pyeantic is a Python interface to the e-antic library. If you want to install pyeantic, it has to be installed together with e-antic. We refer to the Installation section in the e-antic documentation for instructions.

Quickstart#

The Python interface is automatically generated from the C++ code using cppyy. In particular, all classes, functions and methods available from C++ are available from Python. We reproduce here the example from the C++ overview.

>>> import pyeantic
>>> K = pyeantic.eantic.renf_class.make("a^3 - 3*a + 1", "a", "0.34 +/- 0.01", 64)
>>> a = K.gen()
>>> b = a * a - 2
>>> print(b)
(a^2 - 2 ~ -1.8793852)

The Python interface also provides conversions from SageMath, see Interface with SageMath, and the realalg library, see Interface with realalg.