Module: RubyPython::Python
- Extended by:
- FFI::Library
- Defined in:
- lib/rubypython/python.rb
Overview
This module provides access to the Python C API functions via the Ruby ffi gem. Documentation for these functions may be found [here](docs.python.org/c-api/). Likewise the FFI gem documentation may be found [here](rdoc.info/projects/ffi/ffi).
Defined Under Namespace
Classes: DummyStruct, PyObjectStruct
Constant Summary collapse
- PYTHON_VERSION =
Open3.popen3("python --version") { |i,o,e| e.read}.chomp.split[1].to_f
- PYTHON_NAME =
"python#{PYTHON_VERSION}"
- LIB_NAME =
"lib#{PYTHON_NAME}"
- LIB_EXT =
FFI::Platform::LIBSUFFIX
- LIB =
File.join(`python -c "import sys; print(sys.prefix)"`.chomp, "lib", "#{PYTHON_NAME}", "config", "#{LIB_NAME}.#{LIB_EXT}")