David,

>> Furthermore, I find it odd that the example on
>> pyjs.org/examples is producing a different result depending on whether I am
>> accessing the web page or someone else is. I have tried it in Chrome and
>> Firefox with the same results. As a side note, when I tried it in IE, it

The Calendar example works fine for me too for both, the version
online on pyjs.org/examples and the latest git locally on my machine.
I've tested with Chrome 16, FF 11, and Opera 11 - all on Ubuntu Linux.

>> I will keep looking into it and see if I can get some debug stuff to work.
>> Where do I get this new logging module?

The FAQ question on logging (aka "debug output") is not updated yet on
pyjs.org, but it in the repository already: (see bottom of the
following page)
http://pyjs.org/pygit/#file=doc/pyjs_site/public/faq/answers/i_want_to_throw_some_debug_output_onto_the_screen_how_do_i_best_do_that.html&id=a3dae43bcd48c152068e7095499709e5928a61b3&mimetype=text-html

In brief: 2 possibilities

a) quick and easy: (= AppendLogger, i.e. output on the web page)

  from pyjamas import log
  ...
  log.debug("bla bla bla")
  log.info("variable %s also there", myvar)

b) full-featured: (= identical feature set of Python's logging module)

  from pyjamas import logging
  ...
  logging.debug("bla bla bla")   # Python style; prints to stderr
  log = logging.getAlertLogger()  # try also Append / Console / PrintLogger
  log.info("bla bla bla")

debug, info, warning, error are the log levels. The default log level
is set to "debug", so everything is printed.

Have fun,
Peter

Reply via email to