Ok thanks for all the suggestions I will take a look tonight!
Don't know anything about Python so will have a nosey through and try to translate how I can achieve a similar thing in C# (although I imagine once I've streamed the text of the file in the code will be fairly similar).