0

Is it possible to embed Python in a VC++/MFC application. If yes, can you please tell me how to do that.

1 Answer 1

2

Yes, you can embed python in any application where you can call functions from a C library. The fact that you are using MFC is not really important for this.

The official python documentation for this is pretty good:

On how to do that: basically you simply call Py_Initialize(); to initialize Python and then do whatever you want to do with it. Before your application exits it's a good idea to call Py_Finalize(); to clean up things.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.