So what I've gleaned from your replies, and what I've noticed directly
is that, under Windows:

Paster.exe seems to have two general roles, when run as "paster serve
app.ini":

1. To launch an instance of Python and have it execute the whole
pylons app, starting with paster-script.py

2. To act as sort of the "lifetime" manager for said instance of
python and hence your pylons app:

    a. After paster launches pythons/your pylons app, it continues to
run as an .exe, providing the user with some visible running command
line entity with which they can interact:

    b. The user can ctrl-c the instance of pylons.exe, which in turn,
somehow gets python and your pylons app to halt as well.  If
pylons.exe exited as soon as python began running paster-script.py,
then the user would not be able to use ctrl-c to kill their
application (they'd be left sitting at a C: prompt); they'd have to do
something like use Task Mgr to find and kill the proper instance of
python.

    c. To provide the "automatic reload" of an application when the --
reload switch is run. An interesting aside here: when you specify the
--reload switch, paster.exe starts TWO copies of python. My guess is
that one of those runs paster-script.py (effectively running your
pylons app) and the other must be running some python script that
actually provides the file monitoring capability (just a guess).

In short, other than starting your application and giving you a
convenient way to stop it (and restart it), paster.exe does not
actively do *anything* related to your pylons app. It is not "running"
anything in terms of the thread logic, your application logic, etc.
In fact, you can use TaskMgr to kill  paster.exe and  python/your
pylons app continue to run just fine. Or as I originally pointed out,
once you do a Ctrl-C, paster.exe will die but if  you've written some
code in your app that keeps the main thread from terminating, your app
will continue to run long after paste.exe has been unloaded.

I think some of the confusion has been over terminology. One often
reads things like "paster runs a thread pool and queue and processes
incoming web requests"... As I've pointed out above, paster.exe is
doing NONE of these things. However, the python code that IS doing
these things is included when one installs "Paste", which is not an
executable by a series of pylons scripts, etc. that get run subsequent
to python executing paster-script.py

Hope this insight helps someone else.
Michael

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.

Reply via email to