Difference between revisions of "Unquote.py"

From PeformIQ Upgrade
Jump to navigation Jump to search
(New page: =Script= <pre> #!/usr/bin/env python import urllib str = """ <input type="hidden" name="pecontexthandle" value="%3CPromptEngineRuntimeContext%20xmlns%3D%22http%3A%2F%2Fwww.cry...)
 
m
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
=Script=
=Script=


A simple example of using the Python urllib module to decode a quoted string.


<pre>
<pre>
Line 24: Line 24:


[[Category:Python]]
[[Category:Python]]
[[Category:Examples]]

Latest revision as of 16:14, 19 July 2009

Script

A simple example of using the Python urllib module to decode a quoted string.

#!/usr/bin/env python

import urllib

str = """
        <input type="hidden" name="pecontexthandle" value="%3CPromptEngineRuntimeContext%20xmlns%3D%22http%3A%2F%2Fwww.crystaldecisions.com%2Freport%22%20xmlns%3Axsi%3D%22http%3A%2F
...
%3C%2FCascadingPID%3E%3C%2FWorkingUnits%3E%3CNextPID%3E2%3C%2FNextPID%3E%3C%2FPromptEngineRuntimeContext%3E" />
<input type="hidden" name="pevalue" value="" />
<link rel="stylesheet" type="text/css" href="../../../viewers/crystalreportviewers115/prompting/css/promptengine_default.css">

"""

decoded = urllib.unquote(str)

print decoded