#!/usr/bin/env python import cgitb; cgitb.enable() import os, sys, cgi, json from project import Project fs = cgi.FieldStorage() project = fs.getvalue("p", "") proj = Project(project) print "Content-Type: application/json" print print json.dumps(proj._dict()) sys.exit(0) # varz = {} # varz['project'] = project # varz['json_url'] = "?" + urlencode({'project': proj.path, 'format': 'json'}) # print """Content-Type: text/html; charset=utf-8""" # print # print """ # #
#