[ Index ] |
|
Code source de Kupu-1.3.5 |
1 #!/usr/bin/python 2 3 """SpellChecker for Kupu, CGI wrapper""" 4 5 import os, sys 6 os.chdir(os.path.abspath(os.path.dirname(__file__))) 7 sys.path.append(os.path.abspath('../python')) 8 9 from spellcheck import SpellChecker, format_result 10 11 if __name__ == '__main__': 12 import cgi, cgitb 13 #cgitb.enable() 14 #result = repr(sys.stdin.read()) 15 data = cgi.FieldStorage() 16 data = data['text'].value 17 c = SpellChecker() 18 result = c.check(data) 19 if result == None: 20 result = '' 21 else: 22 result = format_result(result) 23 print 'Content-Type: text/xml,charset=UTF-8' 24 print 'Content-Length: %s' % len(result) 25 print 26 print result
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Sun Feb 25 15:30:41 2007 | par Balluche grâce à PHPXref 0.7 |