Archive for the 'PSP' Category
PSP mod_python abort/quit/exit statement
psp.py patch: patch_psp_py.diff
Hello, there is an native handler to use PSP on Mod_python, unfortunately there is no abort statement which you can use like that:
-
req.write("one")
-
abort/cancel/quit/exit statement
-
# the string "two" cannot appear, cause the abort
-
# statement causes PSP flow stop
-
req.write("two")
So, I have made a temporary patch to add this feature in mod_python, the patch simples adds a fake exception out of the running scope and a function called "abort" (exposed to running scope of PSP), so you can apply the patch and use the feature:
-
req.write("one")
-
abort()
-
# the string "two" will not appear, the abort() function
-
#(enabled after patch apply) will stop the flow of program
-
req.write("two")
The patch is for the windows version of mod_python, but you can easy look at the diff and apply to any other version of mod_python, any suggestion or help you can contact me.
In some other post I will talk about PSP with more explanations.
psp.py patch: patch_psp_py.diff
- Christian S. Perone
1 comment
