how to do html parms with python

David Stockwell winexpert at hotmail.com
Wed Jun 30 17:08:16 CEST 2004


I screwed up the subject header on my last one.... sorry folks.

Peter,

Thanks for the information.   I'm not sure if i'm using cgi or pure python 
but I'll try both approaches and see what i'm using.

Thanks

David
--------
Surf a wave to the future with a free tracfone http://cellphone.duneram.com

>------------------------------
>
>Message: 10
>Date: Wed, 30 Jun 2004 15:35:53 +0200
>From: Peter Maas <peter.maas at mplusr.de>
>Subject: Re: using python with HTML and parameters
>To: python-list at python.org
>Message-ID: <cbufiq$lfq$1 at swifty.westend.com>
>Content-Type: text/plain; charset=us-ascii; format=flowed
>
>David Stockwell schrieb:
>
> > In java/jsp I can pass parameters to my python script on a webpage by
> > doing something like this:
> >
> > http://somewhere.org/mypage.jsp?parm1=something&parm2=another
> >
> > How do I do that with python?
>
>If your Python Script uses CGI it's
>
>http://somewhere.org/mypage.py?parm1=something&parm2=another
>
>:) You have to parse the query string with cgi.parse().
>
>Mit freundlichen Gruessen,
>
>Peter Maas
>
>--
>-------------------------------------------------------------------
>Peter Maas,  M+R Infosysteme,  D-52070 Aachen,  Tel +49-241-93878-0
>        eMail 'cGV0ZXIubWFhc0BtcGx1c3IuZGU=\n'.decode('base64')
>-------------------------------------------------------------------
>
>
>------------------------------
>
>Message: 11
>Date: Wed, 30 Jun 2004 15:38:07 +0200
>From: Peter Maas <peter.maas at mplusr.de>
>Subject: Re: using python with HTML and parameters
>To: python-list at python.org
>Message-ID: <cbufmv$lfq$2 at swifty.westend.com>
>Content-Type: text/plain; charset=us-ascii; format=flowed
>
>Peter Maas schrieb:
> > If your Python Script uses CGI it's
> >
> > http://somewhere.org/mypage.py?parm1=something&parm2=another
>
>Correction: this URL does not depend on CGI, only the Python code.
>
>Mit freundlichen Gruessen,
>
>Peter Maas
>
>--
>-------------------------------------------------------------------
>Peter Maas,  M+R Infosysteme,  D-52070 Aachen,  Tel +49-241-93878-0
>        eMail 'cGV0ZXIubWFhc0BtcGx1c3IuZGU=\n'.decode('base64')
>-------------------------------------------------------------------
>
>

_________________________________________________________________
MSN Movies - Trailers, showtimes, DVD's, and the latest news from Hollywood! 
http://movies.msn.click-url.com/go/onm00200509ave/direct/01/





More information about the Python-list mailing list