Installation
Download into zope/Extensions and create a External Method object in the root with all fields filled to w2f.
w2f
Anywhere from Python Scripts or DTML you can call this to print information before it's taken away from you. In DTML is can be handy if you use DTML-call-RESPONSE.redirects and you won't be able to see variables value for example.
In python script, if you use return variable your print "variable is: ", variable won't work. Also, in Python Scripts return printed doesn't work if there is an error down the line.
return variable
print "variable is: ", variable
return printed
Here are some examples of how you can use it:
<dtml-let rr=getRandomX> <dtml-call "w2f(rr)"> <dtml-call "RESPONSE.redirect('http://bla bla bla')"> </dtml-let>
Or as in a Python Script:
if name=="Peter": context.w2f("I am here") o=x else: context.w2f("Obviously not") o=y return o
In External Methods or Python Products, this is not necessary because you can use print anywhere and harmlessly read it from the stdout.
print
The few people I know who could be bothered to try it have found it very useful for development.
I find it very very useful too. Destructing the walls of debugging!