User Profile

Collapse

Profile Sidebar

Collapse
thesnake
thesnake
Last Activity: May 5 '10, 07:07 AM
Joined: May 4 '10
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • thesnake
    replied to CVS file problem.
    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'
    See more | Go to post

    Leave a comment:


  • thesnake
    started a topic CVS file problem.

    CVS file problem.

    1. #! /usr/bin/env python
    2. import MySQLdb
    3. import re
    4. import csv
    5. db=MySQLdb.conn ect(host='local host', db='dbase', user='root',
    6. passwd='pass')
    7. c=db.cursor()
    8. c.execute('SELE CT text FROM tabelle WHERE page_title = "articles"
    9. result = c.fetchall()
    10. f = csv.writer(open ( "text1.txt" ,"w" ))
    11. for line in result:
    12. f.writerow(line )
    13. file= open("text1.txt ","rb")
    14. for line
    ...
    See more | Go to post
No activity results to display
Show More
Working...