[ home | blog home | recent activity ]
If you're writing plugins and you need a place to do some debug printing, the easiest thing to do is to toss a "$debugprint" variable in your foot.html file (or whatever flavour file you want to toss it in). Then every time you want to print a debug statement, do something like this:
request = args["request"]
data = request.getData()
debugprint = data.get("debugprint", "")
data["debugprint"] = debugprint + "\nyour print statement here"
The neat thing about this is that you can leave the $debugprint in your flavour template file when you're done. If the variable is not defined or it doesn't have any data, it gets removed.
changelog
Comments:
Post a new comment:
Three things:
If you can't for some reason post a comment, send me an email: willg at bluesock dot org.
pyblosxom::1.5-dev git-master
Copyright 1996 to 2012, Will Guaraldi Kahn-Greene, under the Creative Commons BY-SA 3.0 license

Will's Blog by William Kahn-Greene is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.