View Source Pythonx (Pythonx v0.2.5)

Documentation for Pythonx.

Summary

Functions

Initializes the Python with the given path to python_home.

List all embedded python versions.

Executes a command with the embedded pip module.

Evaluates the given python code and returns the variables specified in the return option.

Executes a command with the embedded python3 executable.

Returns the path to the python3 executable.

Returns the value for PYTHONHOME.

Functions

Initializes the Python with the given path to python_home.

This function must be called before any other function in this module.

It's expected that the python_home is the path to the python3 directory, which contains the following directories and files:

- bin
  - python3
  - python3.x
- include
- lib
  - python3.x
  - libpython3.x.so (on Linux)
  - libpython3.x.dylib (on macOS)

It's also expected that this function to be called only once, and it must be called before any other function.

Link to this function

initialize_once(python_home \\ python_home())

View Source
Link to this function

inline(code, opts \\ [])

View Source
Link to this function

inline!(code, opts \\ [])

View Source

List all embedded python versions.

Link to this macro

pip!(args, opts \\ [])

View Source (macro)

Executes a command with the embedded pip module.

See Pythonx.C.py_eval_input/0.

See Pythonx.C.py_file_input/0.

See Pythonx.C.py_print_raw/0.

See Pythonx.C.py_single_input/0.

Link to this macro

pyeval(code, opts)

View Source (macro)

Evaluates the given python code and returns the variables specified in the return option.

Link to this macro

pyinline(code, opts \\ [])

View Source (macro)
Link to this macro

python3!(args, opts \\ [])

View Source (macro)

Executes a command with the embedded python3 executable.

Returns the path to the python3 executable.

Returns the value for PYTHONHOME.