Cookies

David Bolen db3l at fitlinxx.com
Mon Mar 19 19:18:14 EST 2001


"Ken Seehof" <kens at sightreader.com> writes:

> > Or, if it isn't going to connect to the server, how about just letting
> > the Python application open up it's own web page internally to run
> > appropriate code on your web server to generate the identifier (which
> > could run as a server script), and then Python could parse it right
> > from the resulting HTML information.
> 
> Again, it's the same catch-22.  I need the server to generate the same
> id that the javascipt generated earlier, but I need each client to have
> a unique id.

I'm still somewhat confused as to the requirement that your javascript
needs the identifier - is there something else it gets used for as
part of the web page other than to generate it on behalf of the
application?

If you support generating the id the first time via a script running
from a normal browser, couldn't you do the same thing as I suggested
above by letting your application itself be that browser - you could
just generate the id server side and parse the results right within
your application, so no need to transfer the id at all.

In other words, why not just use the web page to download the app, and
that's it.  Don't depend on the web page and browser access for
anything else.  Let your application connect to your server (since you
mention it'll do it anyway) and during its first execution get the
server to generate the id and then use it from there.

If you need to have the first generation take place in the context of
an HTTP session, that can still be encapsulated by your Python
application rather than depending on a separate Javascript execution
in a different browser.

--
-- David
-- 
/-----------------------------------------------------------------------\
 \               David Bolen            \   E-mail: db3l at fitlinxx.com  /
  |             FitLinxx, Inc.            \  Phone: (203) 708-5192    |
 /  860 Canal Street, Stamford, CT  06902   \  Fax: (203) 316-5150     \
\-----------------------------------------------------------------------/



More information about the Python-list mailing list