2

How do you use basic ("default"/"built-in"; don't need to be imported) python methods in pybind11?

Lists, dictionaries, and some others do have built-in compatibility, but the method I am looking specifically for (open) is not included via an import. I know that a way around it would be to create a python file with a method wrapping "open" and then calling it as you would any imported method, but I would prefer to do it directly in C++ (using pybind) if possible as otherwise that semi-defeats the purpose.

Any assistance/advice would be greatly appreciated.

4

1 に答える 1