- #! /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 in file.readlines( ):
- p = re.compile(r'\[\[(.*?)\]\](.*?)[(\\\n\*\+)]')
- #p = line.replace("\ (\)" , " ")
- result = p.findall(line)
- f = csv.writer(open ("text2.txt" , "w").writerow(s tr(result))
I do not have line 39 on my programm
File "page_query_tes t.py", line 39
^
SyntaxError: invalid syntax
Comment