Empty String in HREF Args and cgi.py

Joseph C. Kopec kopecjc at worldnet.att.net
Wed Mar 1 00:08:42 EST 2000


Enclosed please find a question I tried to post several times today, but
comp.lang.python does not seem to want to accept it -- I apologize if
this causes a re-post.


My original posting:
   
Is it possible to put an empty string ("" -- not a blank space) in a URL
argument list?  For instance, in

"/cgi-bin/myscript?val1=one&val2=XXX&val3=three"

what should be in place of XXX for val2 to be an empty string?  Is there
an HTML character entity for an empty string (as opposed to   for a
space)?  Would "" or '' work?  Or should I just leave XXX blank, like
"...val2=&val3=three".  Thanks in advance.


My follow-up posting:

When I said "URL" I should have said "HREF" -- I want to embed the
script name plus argument list in a link.  The script will be in Python,
and I will be using the Python cgi.py module to process the arguments. 
Thus, my question is really "How can I put an empty string as a value in
an HREF cgi script argument list in a manner that results in the empty
string value being correctly processed by the Python cgi.py module?"  I
will also post this question to comp.lang.python, but any additional
thoughts here would also be appreciated.



More information about the Python-list mailing list