Skip to content

Instantly share code, notes, and snippets.

@melpon
Last active August 29, 2015 14:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save melpon/8c769de03025d4699da6 to your computer and use it in GitHub Desktop.
Save melpon/8c769de03025d4699da6 to your computer and use it in GitHub Desktop.
python make.py > test.json
curl -v -H "Content-type: application/json" --data-binary "@test.json" http://melpon.org/wandbox/api/compile.json
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