List Info

Thread: Using CherryPy locally and launching a browser




Using CherryPy locally and launching a browser
user name
2006-04-29 18:35:19

Andre wrote:
> http://aroberge.blogspot.com/2006/04/cherrypy-is-great.html
>; Eventually I intend to use this type of web-browser
> environment as a graphical front-end for "rur-ple".

You might want to take a look at HTTPREPL, which gives you a "Python prompt" in your browser. Unfortunately, you can't look at it right now, because our firewall had a meltdown yesterday. :( Try on Monday or Tuesday.
http://projects.amor.org/misc/wiki/HTTPREPL

> As I start CherryPy, I want to start my browser automatically.
> ...
> I was wondering if there was a way to find out if the server
> is running properly before opening the webbrowser connection.
> I'd rather not put an artificial time delay if I can avoid it.

Yes. As Christian Wyglendowski pointed out (http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/442481) you can use start_with_callback:

    cherrypy.server.start_with_callback(
 ;       webbrowser.open, ('http://localhost:8080',) )


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 http://groups.google.com/group/cherrypy-users
-~----------~----~----~----~------~----~------~--~---
Using CherryPy locally and launching a browser
user name
2006-04-29 18:58:47
Robert Brewer wrote:
> Andre wrote:
> > http://aroberge.blogspot.com/2006/04/cherrypy-is-grea
t.html
> > Eventually I intend to use this type of
web-browser
> > environment as a graphical front-end for
"rur-ple".
>
> You might want to take a look at HTTPREPL, which gives
you a "Python prompt" in your browser.
Unfortunately, you can't look at it right now, because our
firewall had a meltdown yesterday. :( Try on Monday or
Tuesday.
> http://pr
ojects.amor.org/misc/wiki/HTTPREPL
>

Will do.

> > As I start CherryPy, I want to start my browser
automatically.
> > ...
> > I was wondering if there was a way to find out if
the server
> > is running properly before opening the webbrowser
connection.
> > I'd rather not put an artificial time delay if I
can avoid it.
>
> Yes. As Christian Wyglendowski pointed out (http://aspn.activestate.com/ASPN/Cookbook/Python/R
ecipe/442481) you can use start_with_callback:
>
>     cherrypy.server.start_with_callback(
>         webbrowser.open, ('http://localhost:8080',) )
> 

Thank you, that worked perfectly!
André

> 
> Robert Brewer


--~--~---------~--~----~------------~-------~--~----~
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 http://
groups.google.com/group/cherrypy-users
-~----------~----~----~----~------~----~------~--~---

[1-2]

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