Last active
August 29, 2015 14:22
-
-
Save melpon/8c769de03025d4699da6 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
python make.py > test.json | |
curl -v -H "Content-type: application/json" --data-binary "@test.json" http://melpon.org/wandbox/api/compile.json |
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
import os | |
import json | |
codes = [] | |
# run on di/include | |
for dirpath, dirnames, filenames in os.walk('boost'): | |
for filename in filenames: | |
path = os.path.join(dirpath, filename) | |
codes.append({ | |
'file': path, | |
'code': open(path).read(), | |
}) | |
code = open('prog.cc').read() | |
options = 'warning,gnu++1y' | |
compiler = 'gcc-head' | |
save = False | |
print json.dumps({ | |
'code': code, | |
'codes': codes, | |
'options': options, | |
'compiler': compiler, | |
'save': save, | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment