   Boost::Python crash in MFC app
  Ok, so I managed to get some Boost::Python code working with lots of help from various forum members here.I thought I'd take things a step further and try and embed Python into an MFC application as that is my ultimate goal. Easy I thought, with my new knowledge.I created a new MFC project in VC2005. I added a button to the dialog and a handler for when it is clicked. I inserted the following code - nothing exciting as I only want to do baby steps first:void Ctest_mfc1Dlg::OnBnClickedButtonGo(){Py_Initialize();boost::python::object main_module;boost::python::object main_namespace;boost::python::object ignored;try{main_module = boost::python::import("__main__");}catch (...)etc..I ran it with debug and stepped over boost::python::import and *boom*! Unhandled exception.Unhandled exception at 0x00000000 in test_mfc1.exe: 0xC0000005: Access violation reading location 0x00000000.The docs say to call Py_Initialize(), which I did and that looks to be all. Am I right in thinking that I can access the __main__ namespace without importing any modules from disk?I'm sure I can - the same code in a Win32 console application works fine. Any ideas what's wrong?Thanks   