CGI question
Dan Stromberg
strombrg at dcs.nac.uci.edu
Sat Nov 26 21:30:58 EST 2005
On Sat, 26 Nov 2005 13:26:11 +0100, Fredrik Lundh wrote:
> Dan Stromberg wrote:
>
>> What's the best way of converting this:
>>
>> 'hide\\?http://www.dedasys.com/articles/programming_language_economics.html\x012005-07-20
>> 14:48'
>>
>> ...to something easily usable in a python CGI script?
>
> easily usable for what purpose?
>
> if you want to extract the URL that seems to be hidden in that string,
> something like:
>
> url, junk = text.split("\x01", 1)
> junk, url = url.split("\\?", 1)
>
> should work.
Um, yeah. I can work out this sort of thing.
But I thought there might be a python module intended for parsing inputs
to CGI scripts? Sometimes using a pre-written module can contend with
issues you didn't know where going to come up...
Thanks!
More information about the Python-list
mailing list