Re: Python newbie trying to embed in C++

2013-02-28 Thread Marwan Badawi

On 27/02/2013 10:26, Ian Kelly wrote:

On Wed, Feb 27, 2013 at 1:51 AM, Marwan lar...@free.fr wrote:

When I run the generated exe, I get errors about the functions not
existing...

TestPython.exe test Hello
AttributeError: 'module' object has no attribute 'Hello'
Cannot find function Hello


test is the name of a module in the standard library.  My guess
would be that for some reason it's importing that module rather than
your test.py.  Make sure that test.py can be found on your sys.path,
and perhaps change the name of your module to reduce confusion.

I just noticed that my reply went to the message sender and not to the 
newsgroup, so I'm posting again: thanks, that was it. Just renaming my 
test.py file solved the problem.


%M
--
http://mail.python.org/mailman/listinfo/python-list


Re: Python newbie trying to embed in C++

2013-02-28 Thread Marwan Badawi

On 27/02/2013 16:17, Christian Gollwitzer wrote:

Am 27.02.13 09:51, schrieb Marwan:

And I'd appreciate it if you could give me pointers to how to easily
call Python from C++.


Maybe you can use boost::python?

http://www.boost.org/doc/libs/1_53_0/libs/python/doc/

Cave: I haven't used it and don't know if it is up-to-date.

 Christian

I just noticed that my reply went to the message sender and not to the 
newsgroup, so I'm posting again: thanks, I'll look into that.


%M
--
http://mail.python.org/mailman/listinfo/python-list