Hello dear pythonists:

I'm developing an application in python, I'm new using this programming
language I used to work with Java, but in my job my superiors suggested me
to develop in this language.
I'm trying to read a dbf file, I already done it but my code shows me all
the lines without spaces, I want it toshow line per line and then write the
lines into a plain txt file. My code is:

from dbf import *
from string import strip
import sys
def demo1():
 a = open ("archivo.txt","w")
 dbf = Dbf('tapalpa_05_plani_point.dbf',new=False)

 for k in dbf:
  print '%s'%(strip(k[2]))

  l=()
  l=(strip(k[2]))
  a.write(l)

 dbf.close()
 a.close()


demo1()
I hope you can help me.
Thank you!
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to