I need to take a list of files and remove a '.2' from a line in each file. I then need to rewrite the file without the '.2'. Using the code below I am >able to take a single file and do exactly what i need to but when trying to use glob.glob to rewrite a number of files I run into problems and >was wondering if anyone could help.
when i run this code i get the following error.
File "learn.py", line 15, in moduleTypeError: coercing to Unicode: need string or buffer, list found
dwhite12 0 Newbie Poster
dwhite12 0 Newbie Poster
Schol-R-LEA 1,446 Commie Mutant Traitor Featured Poster
dwhite12 0 Newbie Poster
TrustyTony 888 ex-Moderator Team Colleague Featured Poster
dwhite12 0 Newbie Poster
Schol-R-LEA 1,446 Commie Mutant Traitor Featured Poster
dwhite12 0 Newbie Poster
dwhite12 0 Newbie Poster
dwhite12 0 Newbie Poster
TrustyTony 888 ex-Moderator Team Colleague Featured Poster
Lucaci Andrew 140 Za s|n
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.