示例#1
0
def texttravel(environ, start_response):
    response_body = ""
    #print "1"
    status = '200 OK'
    response_headers = [('Content-Type', 'text/plain'),
                        ('Content-Length', str(len(response_body)))]
    start_response(status, response_headers)
    #print "2"
    d = parse_qs(environ['QUERY_STRING'])
    content = d.get('content', [''])[0] 
    from_sender = d.get('from', [''])[0]
    number = from_sender
    print content, number
    #print "3"


    content = content.lower()
    spl_txt = content.split()
    db_data = sessions.retrive_data(number)
    if db_data == None:
        sessions.insert(number)
    
    operator = spl_txt[0]
    #print "8"
    interface.process(number,content)
    #print "9"
    return response_body
示例#2
0
文件: image.py 项目: jjdmol/LOFAR
 def process(self, **kwargs):
     """Process Image object"""
     import interface
     success = interface.process(self, **kwargs)
     return success
示例#3
0
 def process(self, **kwargs):
     """Process Image object"""
     import interface
     success = interface.process(self, **kwargs)
     return success