web.py - Output from a Python page call by a JQuery getJSON function -


i'm working on website uses python web.py. there form user enters input , when submit button hit, python page called (matches) using .getjson jquery function show below.

function buildmatches(input){     $.getjson("/matches", {e:input}, function(json){       //returned json object worked on    } } 

the "matches" python page grabs value db, runs string reg ex , returns json object. works fine, question how able output python page "matches" see happening during reg ex operations? i've tried print "" (python 2.5), understand print console. i've done research couldn't find situation. don't need print out html page, where can see what's going on. in advance help.

i have access webserver (ssh, sftp, etc.), tried log importing logging module, below code used. log if ran page command line, not when called js page.

import logging logging.basicconfig(filename='./someclass.log', filemode='w', level=logging.debug)  class someclass:     logging.info('started')     logging.info('another log')      def __init__(self, obj):         logging.info('in init')      def another_functio(self):                 logging.info('logging inside function') 

i've tried setting full path of log , still have same problem log file written or updated when run class console. doesn't work when class called webserver.

logging.basicconfig(filename='/home/.../.../.../example.log', filemode='w', level=logging.debug) 

depending on how access have web server can run code manually web.py uses built-in web server. print statements end on console.

otherwise, have thought writing own log file somewhere accessible browser?


Comments

Popular posts from this blog

jquery - Invalid Assignment Left-Hand Side -

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -