V
V
Vladimir Martyanov2015-04-20 16:55:20
Python
Vladimir Martyanov, 2015-04-20 16:55:20

How to access Python internals from Python script in case of embedded python?

There is an application in C / C ++, the authors built the Python interpreter into it and expanded its capabilities by adding their own module called "appmodule". The application can be launched and arbitrary scripts can be executed in the built-in interpreter. I'm interested in the ability to access the list of added modules from the script and, in particular, to the PyMethodDef arrays in order to get from them the correspondence between the names of the Python functions and the real addresses in the application. Does python have resources?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander, 2015-04-21
@NeiroNx

There is a pydoc mechanism - with its help I received documentation on all the functions in the game The Fall Last Days of Gaya, which also has a built-in python and is used to implement gameplay scripts. This mechanism generates the structure of HTML documents from the available functions.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question