Example 1 --------- >>> import xml.sax.saxutils >>> x= xml.sax.saxutils.XMLGenerator() >>> x._write("Hello World") Traceback (most recent call last): File "", line 1, in AttributeError: XMLGenerator instance has no attribute '_write' Example 2 --------- Trying to save settings in my script gives the following Traceback on stdout: Traceback (most recent call last): File "/usr/local/bin/emcd", line 1672, in settings_dialog self.settings.dialog(self.window) File "/usr/local/bin/emcd", line 1511, in dialog self.save() File "/usr/local/bin/emcd", line 1454, in save self.prepare_writing() File "/usr/local/bin/emcd", line 1423, in prepare_writing self.xmltree.startElementNS((None,u'EELS-GUI-Settings'),u'EELS-GUI-Settings',attrs,True) File "/usr/local/bin/emcd", line 1361, in startElementNS self._write('\t'*self.counter) AttributeError: Generator instance has no attribute '_write' Example 3 --------- This is done in the Python shell compiled locally >>> import xml.sax.saxutils >>> x= xml.sax.saxutils.XMLGenerator() >>> x._write("Hello World") Hello World>>>