you can use:
python::object callback = obj.attr["function_name"];
callback();
On Thu, Nov 13, 2008 at 11:40 AM, Alan Baljeu <[EMAIL PROTECTED]> wrote:
> I'm reading the Python extension tutorial, and I cannot believe the embedding
> section. It tells me the only way to call a python functio
on Thu Nov 13 2008, Stefan Seefeld wrote:
> Alan Baljeu wrote:
>>
>> As best I could figure, I needed to write Python code, execute a script
>> file, get
>> that code to call a C function that I register, in order to have that
>> function. At
>> least the tutorial implied that was the way.
>
Alan Baljeu wrote:
I misspoke. I want a Python function. I was confused by the lack of any
PyModule_GetFunction or anything resembling that in the API.
This is because there is nothing special about functions, as far as
retrieving them from a module('s namespace) is concerned. You just
I cryptically wrote:
> As best I could figure, I needed to write Python code, execute a script file,
> get that code to call a C function that I register, in order to have that
> function. At least the tutorial implied that was the way.
Which made Stefan respond:
>I'm confused. In your last ma
Alan Baljeu wrote:
As best I could figure, I needed to write Python code, execute a
script file, get that code to call a C function that I register, in
order to have that function. At least the tutorial implied that was
the way.
I'm confused. In your last mail you asked for how to get hold
Hans Meine wrote:
>I don't see the problem. AFAICS, "ask for a function by name" is "ask python
>[i.e. callout to python] for a function [which is an object that I can safe
>when I want to call it repeatedly] by name". Which part could be simpler?
As best I could figure, I needed to write Pyth
On Thursday 13 November 2008 15:40:31 Alan Baljeu wrote:
> I'm reading the Python extension tutorial, and I cannot believe the
> embedding section. It tells me the only way to call a python function is
> to callout to python to pass back a function object which I then save so I
> can call it when
Alan Baljeu wrote:
I'm reading the Python extension tutorial, and I cannot believe the embedding
section. It tells me the only way to call a python function is to callout to
python to pass back a function object which I then save so I can call it when I
need to. This seems ridiculous. Surel
2008/11/13 Alan Baljeu <[EMAIL PROTECTED]>
> I'm reading the Python extension tutorial, and I cannot believe the
> embedding section. It tells me the only way to call a python function is to
> callout to python to pass back a function object which I then save so I can
> call it when I need to. T
I'm reading the Python extension tutorial, and I cannot believe the embedding
section. It tells me the only way to call a python function is to callout to
python to pass back a function object which I then save so I can call it when I
need to. This seems ridiculous. Surely there is a way to o
10 matches
Mail list logo