I've been trying this all week. Using PyRun_SimpleString(_T("execfile(\"bounce.py\")")); the vpython window will get the focus and until the MFC application will be unresponsive it is closed. Is there any way vpthon can work with mfc?