Just wrap this code in a DLL and import the functions you need. (Better yet, get the C++ version.)

Otherwise, write a code from scratch that parses the entire file and overwrites it with all of the lines except the line you do not want.

Both methods are quick jobs, if you know how to do it.