Kent Johnson a écrit : > The problem is that the file is never actually written because you omit > the close. But when you do close the temp file, it is deleted. Try using > a.flush() instead of a.close(), that will force the file to be written. > Alternately use tempfile.mkstemp() which lets you close the file and > delete it when you are done with it.
Thank you, this works: ******** import tempfile import webbrowser a = tempfile.mkstemp('.html') f= open(a[1],'w') f.write("<html>Test</html>") f.close() webbrowser.open(f.name) ********* -- Yves Egrix _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor