How to save a file on a users computer with cgi

Paul Boddie paul at boddie.net
Mon Jan 7 12:04:41 CET 2002


bragiba at simi.is (Bragi Baldursson) wrote in message news:<abcf4a18.0201041339.4a73c2ab at posting.google.com>...
> What I am trying to do is the following.  I am basically trying to
> write a web browser GUI to the pwman.py
> (http://www.vex.net/~x/python_stuff.html).

[...]

> I looked briefly at the Cookie module but it seems to me that you
> could write a Cookie to some set location on a users OS.  But isn´t it
> highly likely that the Cookie area gets cleaned out regularily???? I
> need a persistent file object where I can store this.

Arguably, you could use "persistent" cookies which last forever, but
there still isn't any guarantee that the cookies won't get cleared out
for some reason or other.

> My idea now is to go with a database of my own and have users provide
> a user name and a password and I store all the password files locally
> on my machine.  But then I get into a bind of having the users
> information on my conscience and they might get skeptical of me.  I
> would therefore much rather store their information on their
> computers!

One other possibility, for a browser-based user interface, might be to
use DHTML in the way illustrated recently in the following thread:

  http://groups.google.com/groups?th=c4ed88a3ad1fad59

I don't know what the filesystem access is like with DHTML scripts,
though, but I believe that Windows platforms at least support the
concept of a standalone client Web application; otherwise your users
might need to download a Python Web application server (such as Zope
or a more "lightweight" framework) to run the server side of your
application on their own computers... which seems a bit excessive, I
know.

Paul



More information about the Python-list mailing list