[Tutor] Write new line(enter) in txt
Tommy Kaas
tommy.kaas at kaasogmulvad.dk
Mon Mar 28 17:21:35 CEST 2011
Fra: tutor-bounces+tommy.kaas=kaasogmulvad.dk at python.org
[mailto:tutor-bounces+tommy.kaas=kaasogmulvad.dk at python.org] På vegne af
Susana Iraiis Delgado Rodriguez
Sendt: 28. marts 2011 17:12
Til: tutor at python.org
Emne: [Tutor] Write new line(enter) in txt
Hello list!!
This is a very simple question!! I want to write some lines in a txt file,
but my output looks like this:
No existe el archivo C:\índice.dbfNo existe el archivo C:\índice_dwg.dbfNo
existe el archivo C:\índice_raster.dbf
I need it to look like this:
No existe el archivo C:\índice.dbf
No existe el archivo C:\índice_dwg.dbf
No existe el archivo C:\índice_raster.dbf
else:
log.write('No existe el archivo ' +shx+"\n")
if os.path.exists(dbf):
print 'El archivo ' +dbf +' existe'
else:
log.write('No existe el archivo ' +dbf+"\n")
log.close()
Try: ”\r\n”
Tommy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20110328/ebd12ffc/attachment.html>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: Ikke-navngivet vedh?ftet fil 00058.txt
URL: <http://mail.python.org/pipermail/tutor/attachments/20110328/ebd12ffc/attachment.txt>
More information about the Tutor
mailing list