"TypeError: read-only buffer, None" returned from file.write...

Jeremy Hylton jeremy at beopen.com
Wed Jun 21 14:28:13 EDT 2000


It would be better, though, to test explicitly for None and not write
the result to a file when it is None.

sBuffer = m_XMLDoc.transformNode(xslDoc)

if sBudder is None:
	print "Error: transformNode returned None"
else:
	f = open( outFile, 'w')
	f.write(sBuffer)
	f.close()


Jeremy



More information about the Python-list mailing list