• Facebook
  • Twitter
  • Reddit
  • StumbleUpon
  • Digg
  • email

All Samples(10569)  |  Call(10083)  |  Derive(0)  |  Import(486)
Log a message with severity 'DEBUG' on the root logger.

        def debug(msg, *args, **kwargs):
    """
    Log a message with severity 'DEBUG' on the root logger.
    """
    if len(root.handlers) == 0:
        basicConfig()
    root.debug(msg, *args, **kwargs)
        


src/g/o/google-app-engine-HEAD/google/appengine/ext/appstats/sample_appengine_config.py   google-app-engine(Download)
def appstats_should_record(env):
  if appstats_FILTER_LIST:
    logging.debug('FILTER_LIST: %r', appstats_FILTER_LIST)
    for filter_dict in appstats_FILTER_LIST:
      for key, regex in filter_dict.iteritems():
        negated = isinstance(regex, str) and regex.startswith('!')
        if negated:
          regex = regex[1:]
        value = env.get(key, '')
        if bool(re.match(regex, value)) == negated:
          logging.debug('No match on %r for %s=%r', regex, key, value)
          break
      else:
        logging.debug('Match on %r', filter_dict)
        logging.debug('Match on %r', filter_dict)
        break
    else:
      logging.debug('Non-empty FILTER_LIST, but no filter matches')
      return False
  if appstats_RECORD_FRACTION >= 1.0:
    return True

src/g/a/gaesdk-python-HEAD/google/appengine/ext/appstats/sample_appengine_config.py   gaesdk-python(Download)
def appstats_should_record(env):
  if appstats_FILTER_LIST:
    logging.debug('FILTER_LIST: %r', appstats_FILTER_LIST)
    for filter_dict in appstats_FILTER_LIST:
      for key, regex in filter_dict.iteritems():
        negated = isinstance(regex, str) and regex.startswith('!')
        if negated:
          regex = regex[1:]
        value = env.get(key, '')
        if bool(re.match(regex, value)) == negated:
          logging.debug('No match on %r for %s=%r', regex, key, value)
          break
      else:
        logging.debug('Match on %r', filter_dict)
        logging.debug('Match on %r', filter_dict)
        break
    else:
      logging.debug('Non-empty FILTER_LIST, but no filter matches')
      return False
  if appstats_RECORD_FRACTION >= 1.0:
    return True

src/a/p/AppEngine-mlk-1.3.6/google/appengine/ext/appstats/sample_appengine_config.py   AppEngine-mlk(Download)
def appstats_should_record(env):
    if appstats_FILTER_LIST:
        logging.debug('FILTER_LIST: %r', appstats_FILTER_LIST)
        for filter_dict in appstats_FILTER_LIST:
            for key, regex in filter_dict.iteritems():
                negated = isinstance(regex, str) and regex.startswith('!')
                if negated:
                    regex = regex[1:]
                value = env.get(key, '')
                if bool(re.match(regex, value)) == negated:
                    logging.debug('No match on %r for %s=%r', regex, key, value)
                    break
            else:
                logging.debug('Match on %r', filter_dict)
                logging.debug('Match on %r', filter_dict)
                break
        else:
            logging.debug('Non-empty FILTER_LIST, but no filter matches')
            return False
    if appstats_RECORD_FRACTION >= 1.0:
        return True

src/p/y/PyAMF-HEAD/doc/tutorials/examples/actionscript/simple/python/client.py   PyAMF(Download)
    lenards = user_service.get_user('lenards')
 
    # in case you don't believe me - this shows I'm not lying
    logging.debug("isinstance(lenards, dict): %s" % isinstance(lenards, dict))
 
    # the User class attributes are not present at this point
    logging.debug("not hasattr(lenards, 'username'): %s" %
                  (not hasattr(lenards, 'username')))
    logging.debug("not hasattr(lenards, 'email'): %s" %
                  (not hasattr(lenards, 'email')))
    logging.debug("not hasattr(lenards, 'password'): %s" %
                  (not hasattr(lenards, 'password')))
 
    # but the values are there
    logging.debug("lenards['username'] == 'lenards': %s" %
                  (lenards['username'] == 'lenards'))
    logging.debug("lenards['email'] == 'lenards@ndy.net': %s" %
                  (lenards['email'] == 'lenards@ndy.net'))
 
    logging.debug("Output 'lenards': %s" % lenards)
 
    # if we register the class and the namespace, we get an object ref
    # (complete with attributes and such)
    logging.debug("Register UserDataTransferObject class...")
    logging.debug("Register UserDataTransferObject class...")
    pyamf.register_class(UserDataTransferObject, '%s.User' % AMF_NAMESPACE)
 
    logging.debug("Get a user from the server...")
    usr = user_service.get_user('lisa')
 
    # ensure it's the class we expect
    logging.debug("Ensure the class we got is our DTO, " +
                  "isinstance(usr, UserDataTransferObject): %s" %
                  isinstance(usr, UserDataTransferObject))
 
    # verify it has expected attributes
    logging.debug("Verify attributes present...")
    logging.debug("usr.username: %s" % usr.username)
    # verify it has expected attributes
    logging.debug("Verify attributes present...")
    logging.debug("usr.username: %s" % usr.username)
    logging.debug("usr.email == 'lisa@pwns.net': %s" %
                  (usr.email == 'lisa@pwns.net'))
    logging.debug("usr.password == 'h1k3r': %s" %
                  (usr.password == 'h1k3r'))
 
    logging.debug("Output user returned: %s" % usr)
 
    # request an unknown user
    logging.debug("Try to get a user that does not exist...")
    logging.debug("Try to get a user that does not exist...")
    george = user_service.get_user('george')
 
    logging.debug("Output returned: %s" % george)
 
 
if __name__ == '__main__':

src/l/a/lamson-1.0/examples/librelist/app/handlers/admin.py   lamson(Download)
        return START
 
    elif list_name in INVALID_LISTS or message['from'].endswith(host):
        logging.debug("LOOP MESSAGE to %r from %r.", message['to'],
                     message['from'])
        return START
 

src/d/i/divisi-HEAD/doc/examples/crossbridge_example.py   divisi(Download)
        cnet.del_edge((vertex, vertex, reltype))
'''
 
logging.debug("ConceptNet has %d vertices and %d edges...", len(cnet.vertices()), len(cnet.edges()))
 
 
'''

src/l/a/lamson-1.0/examples/osb/app/model/post.py   lamson(Download)
def delete(post_name, user):
    file_name = blog_file_name(post_name, user)
 
    if os.path.exists(file_name):
        logging.debug("DELETING %s", file_name)
        os.unlink(file_name)
        remove_from_queue(post_name, user)
        msg = post_q.get(k)
        name, address = email.utils.parseaddr(msg['to'])
        if address.startswith(post_name):
            logging.debug("Removing %s:%s from the queue", k, address)
            post_q.remove(k)
 
 

src/d/i/Divisi-0.6.10/doc/examples/crossbridge_example.py   Divisi(Download)
        cnet.del_edge((vertex, vertex, reltype))
'''
 
logging.debug("ConceptNet has %d vertices and %d edges...", len(cnet.vertices()), len(cnet.edges()))
 
 
'''

src/p/y/PyNN-0.6.0/test/test_examples.py   PyNN(Download)
        pylab.title(script)
 
    for engine in engines:
        logging.debug("Running %s with %s" % (script, engine))
        traces[engine] = []
        try:
            run(script, engine)
    if len(engine_list) < 2:
        logging.error("Need at least two simulators to run tests.")
        sys.exit(1)
    logging.debug("Using the following simulators: %s" % ", ".join(engine_list))
 
    thresholds_v = {"IF_curr_alpha"  : 0.26,
                    "IF_curr_exp"    : 0.25, 
        scripts_v   = thresholds_v.keys()
        scripts_ras = thresholds_ras.keys()
 
    logging.debug("Running the following examples: %s,%s using engines %s" % (scripts_v, scripts_ras,engine_list))
 
    for script in scripts_v:
        compare_traces(script, thresholds_v[script]*(len(engine_list)-1), engine_list)

src/l/a/lamson-1.0/examples/osb/app/handlers/post.py   lamson(Download)
 
        relay.deliver(msg)
    else:
        logging.debug("Invalid action: %r", action)
 
    return POSTING
 

  1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9  Next