CGI docs

Doru-Catalin Togea doru-cat at
Fri Oct 25 11:03:15 CEST 2002


Thanks for your links. I did do some research prior to posting my previous
message, and I did do some research after receiving some answers. I still
do not find what I am looking for.

I want to send parameters to my CGI programmes in the URL, not in any html
form. I am looking for a way to read in the parameters from the URL.

For example, I have the following link in a webpage:

<a href = "http://localhost/mhpp/'Catalin'">name</a>

I want my script "" to be able to pick up the
"name:Catalin" pair. The closest I came to finding a way to do it is the
"urlparse" function described, among other places, at

An an example they say:

yields the tuple 

('http', '', '/%7Eguido/Python.html', '', '', '')

Now, that's fine, but what do > I <  pass as an argument to urlparse() in
my script? That is, which object contains the URL? It certainly isn't
sys.argv[0], which only gives the file name (with path).

In the example they KNOW the url, and just parse it. I DO NOT know my URLs
and I am asking for docs and / or code examples of the mechanisms which
can be used so that a script can know from which URL it has been called.

Anyone who can point me in the right direction?

Best regards,


> > Where do I find documantation for CGI scripting with Python? I am
> > particularly interested in how to get the arguments passed to the script
> > in an URL.
> >
> > Thanks in advance,
> > Catalin

	<<<< ================================== >>>>
	<<     We are what we repeatedly do.      >>
	<<  Excellence, therefore, is not an act  >>
	<<             but a habit.               >>
	<<<< ================================== >>>>

More information about the Python-list mailing list