The fact is there is no equivalent of "loading an application" because
Java is a compiled language, python is an interpreted language.

This does not mean that your problem does not exist of that there is
no solution for it. The easiest way is to create a startup script

    appilcations/yourapp/private/yourscrpt.py

then run

    python web2py.py -S yourapp -M -R applications/yourapp/private/
yourscript.py

This will run your script once, as it is were in a controller,
bypassing the web server completely.
You can easily create a startup script for web2py that runs it before
starting web2py.

If this does not solve your issues, could you be more specific about
the task you need to perform?

Massimo

On Oct 28, 1:47 am, billf <[EMAIL PROTECTED]> wrote:
> Coming from Java servlets, I find a couple of features useful:
>
> 1) To be able to run a method when my servlet/application is first
> loaded.
>
> 2) To be able to specify that the servlet/application be loaded when
> the server starts as opposed to when the first request is received.
> Obviously, this feature is useful in avoiding first request delays if
> the start up method is lengthy.
>
> How would I do the above in web2py?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" 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/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to