Created
December 17, 2011 12:51
-
-
Save matthewd/1490137 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/ants/visualizer/visualize_locally.py b/ants/visualizer/visualize_locally.py | |
index 7dc6ec1..7a3d6b4 100755 | |
--- a/ants/visualizer/visualize_locally.py | |
+++ b/ants/visualizer/visualize_locally.py | |
@@ -35,10 +35,12 @@ def generate(data, generated_path): | |
data = data.replace('\n', '\\\\n') | |
content = path_re.sub(mod_path, content) | |
- content = insert_re.sub(data, content) | |
+ contents = insert_re.split(content, 2) | |
output = open(generated_path, 'w') | |
- output.write(content) | |
+ output.write(contents[0]) | |
+ output.write(data) | |
+ output.write(contents[1]) | |
output.close() | |
def launch(filename=None, nolaunch=False, generated_path=None): |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment