I see but i have now this error message
Traceback (most recent call last):
File "page_query_tes t.py", line 28, in <module>
f = csv.writer(open ("wikiparsedexp .txt" , "w").writerow(s tr(result)))
AttributeError: 'file' object has no attribute 'writerow'
User Profile
Collapse
-
CVS file problem.
- #! /usr/bin/env python
- import MySQLdb
- import re
- import csv
- db=MySQLdb.conn ect(host='local host', db='dbase', user='root',
- passwd='pass')
- c=db.cursor()
- c.execute('SELE CT text FROM tabelle WHERE page_title = "articles"
- result = c.fetchall()
- f = csv.writer(open ( "text1.txt" ,"w" ))
- for line in result:
- f.writerow(line )
- file= open("text1.txt ","rb")
- for line
No activity results to display
Show More
Leave a comment: