Skip to content

Instantly share code, notes, and snippets.

@young40
Created January 10, 2015 10:37
Show Gist options
  • Save young40/2b0b6047497fcd0cfda3 to your computer and use it in GitHub Desktop.
Save young40/2b0b6047497fcd0cfda3 to your computer and use it in GitHub Desktop.
#! /usr/bin/python
Content = open("ui.ccs").read()
ContentArray = Content.split("\n")
newContent = ""
Skip = False
for c in ContentArray:
if "<<<<<<<" in c:
continue
if "=======" in c:
Skip = True
continue
if ">>>>>>>" in c:
Skip = False
continue
if Skip:
continue
newContent += c + "\n"
newContent = newContent[:-1]
fp = open("ui.ccs", "w")
fp.write(newContent)
fp.close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment