List Info

Thread: Tutorial 2 uses engine.block() but Tutorial 1 doesn't?




Tutorial 2 uses engine.block() but Tutorial 1 doesn't?
country flaguser name
United States
2007-04-30 16:30:50
I'm very new to CP, and have a confusion about when
"cherrypy.engine.block()" should be called and
when
cherrypy.quickstart is sufficient (which apparently does not
call
engine.block).

In the official most recent CP tutorials (http://www.cherrypy.org/

browser/trunk/cherrypy/tutorial),
I see that Tutorial 1 (tut01_helloworld.py) calls
cherrypy.quickstart(), but Tutorial 2
(tut02_expose_methods.py)
instead calls this sequence:

  cherrypy.server.quickstart()
  cherrypy.engine.start()
  cherrypy.engine.block()

In the page, it says the cherrypy.quickstart function is as
follows,
which seems to not contain a call to engine.block():

def quickstart(root, script_name="",
config=None):
    if config:
        cherrypy.config.update(config)
    tree.mount(root, script_name, config)
    server.quickstart()
    engine.start()

Thanks in advance for any explanations or pointing me to any
reference
that discusses it.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "cherrypy-users" group.
To post to this group, send email to cherrypy-usersgooglegroups.com
To unsubscribe from this group, send email to
cherrypy-users-unsubscribegooglegroups.com
For more options, visit this group at h
ttp://groups.google.com/group/cherrypy-users?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Tutorial 2 uses engine.block() but Tutorial 1 doesn't?
country flaguser name
United States
2007-04-30 16:41:36
buffalob wrote:
> I'm very new to CP, and have a confusion about when
> "cherrypy.engine.block()" should be called
and when
> cherrypy.quickstart is sufficient (which apparently
does not call
> engine.block).
> 
> In the official most recent CP tutorials (http://www.cherrypy.org/

> browser/trunk/cherrypy/tutorial),
> I see that Tutorial 1 (tut01_helloworld.py) calls
> cherrypy.quickstart(), but Tutorial 2
(tut02_expose_methods.py)
> instead calls this sequence:
> 
>   cherrypy.server.quickstart()
>   cherrypy.engine.start()
>   cherrypy.engine.block()
> 
> In the page, it says the cherrypy.quickstart function
is as follows,
> which seems to not contain a call to engine.block():
> 
> def quickstart(root, script_name="",
config=None):
>     if config:
>         cherrypy.config.update(config)
>     tree.mount(root, script_name, config)
>     server.quickstart()
>     engine.start()

If you mean http://www.c
herrypy.org/wiki/UpgradeTo30, that was incorrect
(and I've fixed it now). The "cherrypy.quickstart"
function does indeed
call engine.block().


Robert Brewer
System Architect
Amor Ministries
fumanchuamor.org

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "cherrypy-users" group.
To post to this group, send email to cherrypy-usersgooglegroups.com
To unsubscribe from this group, send email to
cherrypy-users-unsubscribegooglegroups.com
For more options, visit this group at h
ttp://groups.google.com/group/cherrypy-users?hl=en
-~----------~----~----~----~------~----~------~--~---


[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )