[Q] Python CGI Q

Chris chris at cmb-enterprises.com
Sun Apr 7 14:31:28 EDT 2002


In article <o3kvauc4u8i6cp803df18s5924qq0s7mlm at 4ax.com>,
 Tim Roberts <timr at probo.com> wrote:

> "John" <nobody at nobody.com> wrote:
> >
> >Hi, I'm wondering if I can write a CGI that loads/edits/saves files on
> >server side.. (I don't need to worry about security concerns for this
> >application) Any starting point or open-source?
> 
> EVERYTHING in a CGI script happens on the server side.  You can create a
> <TEXTAREA> and copy the contents of your file inside it, then have a second
> script wait for the response and write the new contents out.

I actually prefer to have one script cover both of these things.  The 
receiving script should handle errors, and redisplay the form with 
appropriate error information, anyway, so giving it the ability to 
display a blank form if nothing has been submitted is trivial.

form(HTML) -> processor(CGI)

It also saves bandwidth, and thus production costs by not requiring a 
page to link back to the form if the CGI is called without any user 
input.

But Im getting off-topic...



More information about the Python-list mailing list