mwm at mired.org
Sun Nov 27 04:13:13 CET 2005
Dan Stromberg <strombrg at dcs.nac.uci.edu> writes:
> On Sat, 26 Nov 2005 13:26:11 +0100, Fredrik Lundh wrote:
>> Dan Stromberg wrote:
>>> What's the best way of converting this:
>>> ...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.
> 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...
Generally, input to CGI scripts are done via the Common Gateway
Interface (CGI). The cgi module does those things. Your example
doesn't look anything like a CGI string, though. Maybe if you told us
where it came from, we could recommend a module for dealing with such.
Mike Meyer <mwm at mired.org> http://www.mired.org/home/mwm/
Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information.
More information about the Python-list