Posted by Mamutti on Mon 16 Nov 19:34
report abuse | download | new post
- def gravar(glossario):
- '''Grava os dados do glossário fornecido no seu arquivo.'''
- try:
- csvfile = codecs.open(glossario.path, 'wb', CODIFICACAO)
- except IOError, erro:
- raise ArquivosError('Erro ao gravar o arquivo: %s' % erro)
- else:
- writer = csv.writer(csvfile, dialect='default')
- writer.writerows(glossario.items())
- finally:
- csvfile.close()
Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.