'Function to merge the existing file of user-supplied strings
with newly uploaded strings'

@staticmethod
def merge_user_strings_file(newstrings):

    user_file = os.path.join(current.request.folder, 'uploads', 'user_strings.txt')
    oldstrings = []
    oappend = oldstrings.append
    if os.path.exists(user_file):
        f = open(user_file, 'r')
        for line in f:
            oappend(line)
        f.close()
    f = open(user_file, 'a')
    for s in newstrings:
        if (s not in oldstrings):
            f.write(s)
    f.close()
