Stupid Newbie Question Concerning CGI and Reading Forward Slashes



Hi, I want to make a configuration script for something and it needs to
read inputs from an HTML file. A couple of these inputs are textboxes
that the user inputs a path in. For example:
Your Home Directory:
[/home/me/public_html/]

So, I'm using Python to read these inputs and store them in a
configuration file. However, I cannot get the CGI to read the forward
slashes (/). It just leaves a blank area. So, for example:
Input: /usr/bin/sendmail
Reads: sendmail

Input: /home/me/public_html/
Reads: (Nothing.)

params = cgi.FieldStorage()

def writep(key, name):
if params.has_key(key):
fconfig.write(name + ": " + os.path.split(params[key].value)[1] +
";\n")

^ This is the function for handling a key that is read by the cgi. The
"name" is the name that it stores the key under so the configuration
file looks like:
name: key;[Line Break]

However, is there a way to get it to read the forward slashes? If
there isn't do you suggest having the user use a different character
and adding a function in the script to substitute a forward slash for
that character?

I tried looking for this for a long while, but maybe I didn't search
enough. Thanks for all of your help and I'm sorry if this is a
question that has been asked 15 million times.

Joey C.

.



Relevant Pages

  • Re: Web Browser Direct Access not working.
    ... The browser is configured via a group policy to enable automatic ... "Web Proxy clients can use a configuration script to automatically update ... ISA Server provides a default configuration script at the location ...
    (microsoft.public.isa)
  • Re: Stupid Newbie Question Concerning CGI and Reading Forward Slashes
    ... Hi Joey, ... I want to make a configuration script for something and it needs to ... is there a way to get it to read the forward slashes? ... > there isn't do you suggest having the user use a different character ...
    (comp.lang.python)
  • [opensuse] Xen and Paravirtualization Problems TIA
    ... I return to the Yast Xen Manager and start setting up my first VM and it failed. ... --help_config Print the available configuration variables (vars) ... for the configuration script. ... values that were not set on the command line are ...
    (SuSE)
  • Re: Service-Type: Framed no matter what?
    ... Setting up Secure Infrastructure for Wireless Network (March 29, 2005, ... with experts from the Internet Authentication Service team to get them ... configuration script. ... configuration info in script form. ...
    (microsoft.public.internet.radius)
  • array.dll configuration script not downloading
    ... This configuration stopped working last week with no apparent changes ... I can download the script from the browser manually, save it, rename it ... is in the "Use Automatic Configuration Script" field any requests will ...
    (microsoft.public.isa)