It seems so simple to me, but for some reason I can't get python to split properly on the following.
f = open('text', 'r')
x = f.read()
result = x.split('^ggggg', 1)
str.split() does not take a regex.
You could, however, use the string '\nggggg', which will match on a
\n, if it's not at the top of a file.
Another possibility is to use the regex functions, documented here.