Python/ASP Docs/Questions

Dave Rogers rogersd at bigfoot.com
Tue Feb 13 23:31:58 EST 2001


I'm a newcomer to this group, but I'm working on a fairly large and exciting web site using Win2K/Python/ASP (win32 135/Python2.0)

I cannot find any docs regarding the COM Scripting object that it uses.

Can anyone (Mark?) refer me to proper docs for it? - I've checked ActiveState and the net in general with no luck.

My two main problems are:

1) I would like for the COM Scripting object to not cache modules for me as I develop my code.  I see the following conceivable solutions:

a) There is some COM method I can call that will turn it off
b) There is some process I can kill or restart (I tried WWW Publishing service) that will knock everything out of memory
c) I can do manual reloads everywhere which are not desirable because I have some open source code that does "from foo import foo" where I cannot reload (foo) and I don't want to mess with the open source code because then I mess up the open source project
d) Reboot the PC

2) I want to set cookies easily using Response.  I would like to go Response.Cookies('name') = 'bob' (for a simple cookie), but instead I am forced to go

import Cookie
c = Cookie.Cookie()
...
Response.AddHeader("Set-Cookie", c[12:])
(or something similar to that)

I know Cookies is a collection - I seem to have this problem setting ASP Object values in general as I have to go Session.SetValue to set session variables.

I really appreciate any help people can give me - these seem like fairly common issues, yet beyond the newbie level.

P.S. One of the neatest things I've seen is Chuck Esterbrook's MiddleKit which was just released under Webware (http://webware.sourceforge.net).  What it does is allow you to map your python objects to a database for design and run time access.  What this means is that you can relate your objects in a 1 to 1 or 1 to many relationship and the MiddleKit will service all of your SQL needs - you do NOT write SQL or use recordsets.  Once you acquire one or more objects from the database, you can follow their object references to other database objects.  In fact I have abandoned ADO in favor of this middle layer which resides in between the database and my web site.  I probably didn't do it justice but you'll just have to check it out.

Thanks,
--
Dave Rogers




More information about the Python-list mailing list