I would like to start web2py rocket instance like what we can do with command line python web2py.py -S appname -M, but from python interpreter.
So, I can start web2py instance when I launch my test run from my test runner script... So I don't have to make sure there is a web2py instance running and I can launch test run in the background... Richard On Tue, Dec 8, 2015 at 2:38 PM, Massimo Di Pierro < [email protected]> wrote: > Not sure what you mean. web2py is a collection of pyhton modules. You can > import them and use them as any pyhton module. > > >>> import sys > >>> sys.append('/path/to/web2py') > >>> from gluon.html import DIV, SPAN > >>> print DIV('hello',SPAN('world')) > > for your convenience we provide a custom shell (like ipython does) which > works as if you were inside an app: > > python web2py.py -S appname -M > >>> print db.tables > > > On Tuesday, 8 December 2015 09:23:24 UTC-6, Richard wrote: >> >> Hello, >> >> Is there a way to launch web2py from within python interpreter? >> >> Like pytest : >> https://pytest.org/latest/usage.html#calling-pytest-from-python-code >> <https://www.google.com/url?q=https%3A%2F%2Fpytest.org%2Flatest%2Fusage.html%23calling-pytest-from-python-code&sa=D&sntz=1&usg=AFQjCNG3EoTpFL3OKvQUDwSPfsoqYd1Slw> >> >> Thanks >> >> Richard >> > -- > Resources: > - http://web2py.com > - http://web2py.com/book (Documentation) > - http://github.com/web2py/web2py (Source code) > - https://code.google.com/p/web2py/issues/list (Report Issues) > --- > You received this message because you are subscribed to the Google Groups > "web2py-users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.

