[Pythonmac-SIG] PythonCGISlave conflict with SMTPlib? (MacOS 9, Pers. Web Sharing)

Just van Rossum just@letterror.com
Sun, 20 Aug 2000 19:22:42 +0100


At 9:58 AM -0700 20-08-2000, Bob Heeter wrote:
>Hi again -
>
>Many, many thanks, Just, for the speedy response.  That solution works like
>a charm, except the call to apply uses MacOS.SchedParams and not
>MacOS.SetSchedParams (at least for me - I'm running Python 1.5.2c1).

Oops, sorry, I thought I had corrected that before I sent it...

>I've been running my CGI applets in the background, so that was no problem.

It's good to know that it works!

>FWIW, in addition to putting this email notification bit into PythonCGIslave's
>exception-handling code,

(It's wiser to put your notifier in your CGI code, or write a module that
does it for you, since it's very application specific: I don't think this
stuff belongs in PythonCGISlave.)

>I've also added some code so that, when
>a PythonCGISlave-based CGI applet is launched in LONG_RUNNING mode,
>it loads in some persistent data from a file, and then periodically
>reloads the data according to a programmable update schedule.
>The CGI can then use the data without having to reload it every time it
>gets asked to handle an event, which speeds up the response (on my poor
>sluggish server at least).  I've also written a utility function for
>easily sending email attachments.

Same comment: you could do the same in a module (and modules don't get
reloaded at each request, so you can store semi-persistent data there).

Just