I wrote a program which read a file (call a) line by line and use this content to search some files (call b) inside a folder, my first version is 2 loop, first loop is openning b and open a each time to search. The second version is open b and save all content to List, and then 2 loop for openning b and the list, I suppose the list will be faster because no file open/read opeartion each time. However, the speed is slower than the first version very much. Is file open / read is faster than access...
You are right, when I convert it to UTF-8, this issue solved, but I am thinking that how can solve it in program to let it can face different unicode format.
Hi all, I am newbie in python, I write a script which read the text file (d:\subsitutions.txt) and searh and replace the content to all files in the target folder (d:\temp\a), but the result is not found because of each search string has the Byte Order Mark in front of the search string The subsitutions.txt file structure as following which save as UTF-8 BOM an8 an7 Now my program is written in following which search and show the line first #coding: UTF-8 import os import sys console.write('Program...
Dear all, I write a python script which help me to convert all files in UTF-8 without BOM in specific extension. However, the error is stopped on the statement of notepad.open(fileName), the error seem I am missing of argument of unicode, but I search in python script, the notepad.open should pass the filename only. I currently usePhython Script version 1.0.8, do you know why? Thanks all. The error in Console File "C:\Users\Chris\AppData\Roaming\Notepad++\plugins\Config\PythonScript\scripts\Convert...