Ed Fear
For those wishing to look at the source, I have put the two files - EmbeddedPythonFunc.cpp and script2.py - in my webspace to prevent everyone having to download them as attachments. They are available at the following addresses:
http://kutsurogu.pwp.blueyonder.co.uk/EmbeddedPythonFunc.cpp http://kutsurogu.pwp.blueyonder.co.uk/script2.py
(incidentally, I didn't include stdafx.h because it simply includes iostream, tchar.h and boost/python.hpp).
I hope I have sent my help request to the right place!
The most-right place is http://www.boost.org/more/mailing_lists.htm#cplussig. Please ask there if you have more questions. Boost.Python is not compatible with PyFinalize (see http://www.boost.org/libs/python/todo.html#pyfinalize-safety). Try just not calling it. -- Dave Abrahams Boost Consulting http://www.boost-consulting.com