Save history to a text file in user home directory

def save_history(self):
        """Save history to a text file in user home directory"""
        open(self.LOG_PATH, 'w').write("\n".join( \
                [to_text_string(self.pydocbrowser.url_combo.itemText(index))
                 for index in range(self.pydocbrowser.url_combo.count())]))