From: Noel O'B. <bao...@gm...> - 2007-07-17 16:10:53
|
I've got a simple cclib-based webservice running. You can check it out by running something like the following script. It doesn't need simplejson, but if available, it will use it in preference to 'eval' (which can be a security risk). import urllib try: import simplejson except: simplejson = None data = urllib.urlencode({'logfile': open("dvb_sp.out").read()}) f = urllib.urlopen("http://www.redbrick.dcu.ie/~noel/cclib/test.py", data) if simplejson: result = simplejson.loads(f.read()) else: result = eval(f.read()) print result.keys() Now you can use cclib even if it isn't installed on your own computer, or from a variety of different programming languages. I don't yet deal with errors correctly, so don't stress the script too much! Noel |