Replace and inserting strings within .txt files with the use of regex
Νίκος
nikos.the.gr33k at gmail.com
Mon Aug 9 17:15:30 EDT 2010
D:\>convert.py
File "D:\convert.py", line 34
SyntaxError: Non-ASCII character '\xce' in file D:\convert.py on line
34, but no
encoding declared; see http://www.python.org/peps/pep-0263.html for
details
D:\>
What does it refering too? what character cannot be identified?
Line 34 is:
src_data = src_data.replace( '</body>', '<br><br><center><h4><font
color=green> Αριθμός Επισκεπτών: %(counter)d </body>' )
Also,
for currdir, files, dirs in os.walk('test'):
for f in files:
if f.lower().endswith("php"):
in the above lines
should i state os.walk('test') or os.walk('d:\test') ?
More information about the Python-list
mailing list