Displaying contents of a file using PyWin

Gabriel Genellina gagsl-p32 at yahoo.com.ar
Thu Dec 21 20:53:42 EST 2006


[Forwarded from python-list at ...]

At Thursday 21/12/2006 13:51, MiguelS wrote:

>import win32ui
>from pywin.mfc import docview
>
>t = docview.DocTemplate()
>t.OpenDocumentFile("d:/temp/music.log", True)
>
>This caused windows to close PythonWin.

This appears to be a problem with pywin32.
Using release 209 for Python 2.4 I get an Access Violation.

Also I've noticed that this idiom:

try:
     win32ui.GetApp().RemoveDocTemplate(template)
except NameError:
     # haven't run this before - that's ok
     pass

doesn't work anymore because RemoveDocTemplate raises a different 
exception now.


-- 
Gabriel Genellina
Softlab SRL 


	

	
		
__________________________________________________ 
Preguntá. Respondé. Descubrí. 
Todo lo que querías saber, y lo que ni imaginabas, 
está en Yahoo! Respuestas (Beta). 
¡Probalo ya! 
http://www.yahoo.com.ar/respuestas 




More information about the Python-list mailing list