"sophie_newbie" <[EMAIL PROTECTED]> writes:
> Is there any way that I can pass cgi parameters to my script locally,
> before i upload it to the webserver, so that i can debug it.
>
> Normally I would pass parameters like this:
>
> www.webserver.com/script.cgi?TERM1=hello&FIELD1=TTL&TERM2=goodby&FIELD2=GOVT

CGI paramaters are set in the environment. On Unix, in an sh-like
shell, do:

QUERY_STRING='TERM1=hello&FIELD1=TTL&TERM2=goodby&FIELD2=GOVT' 
www.webserver.com/script.cgi

Depending on the package you're using for handling CGI, you may need
to set other CGI parameters as well. The traceback from trying this
should give you a KeyError naming the environment variable it's
looking for.

        <mike
-- 
Mike Meyer <[EMAIL PROTECTED]>                  http://www.mired.org/home/mwm/
Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information.
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to