Sorry, the code I posted was wrong. I tried import win32ui from pywin.mfc import docview t = docview.DocTemplate() t.OpenDocumentFile("d:/temp/music.log", True) This caused windows to close PythonWin.