summaryrefslogtreecommitdiff
path: root/build.py
diff options
context:
space:
mode:
Diffstat (limited to 'build.py')
-rw-r--r--build.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/build.py b/build.py
new file mode 100644
index 0000000..dc1788f
--- /dev/null
+++ b/build.py
@@ -0,0 +1,18 @@
+import sys, re
+
+def remove_comments(source):
+ """
+ Returns 'source' minus docstrings.
+ """
+ comments = re.findall(r"'''[s\S]*?'''", source)
+ print(comments)
+ #return out
+
+
+filename = '%s' %(sys.argv[1])
+output = '%s' %(sys.argv[2])
+with open(filename, newline='') as f:
+ content = f.read()
+ content = remove_comments(content)
+ with open(output, 'w') as file_object:
+ file_object.write(content)