It does not hang. It starts the server. The server blocks. If you want to start the server is a new thread:
import os, sys, thread, time filepath = r'P:/Web2Py/web2py_src/web2py' sys.path.append ( filepath ) os.chdir ( filepath ) ## <== absolutely necessary to get the version number !!! from gluon.main import HttpServer server = HttpServer ( password='xxx' ) #ip,port,admin_password) thread.start_new_thread(server.start,(,)) print 'piep' time.sleep(10000) will print piep but will only live for 10000. It is up to you to handle concurrency. On Aug 23, 5:07 pm, Stef Mientki <[email protected]> wrote: > hi Massimo, > > On 23-08-2010 22:56, mdipierro wrote:> No. > > > you either dubmp the gluon folder in site-packages > > > site-packages/gluon > > then it crashes on not having a version number> or better > > > import sys > > sys.path.append('location/to/web2py/') > > the program just hangs completely: > > import os, sys > filepath = r'P:/Web2Py/web2py_src/web2py' > sys.path.append ( filepath ) > os.chdir ( filepath ) ## <== absolutely necessary to get the > version number !!! > from gluon.main import HttpServer > server = HttpServer ( password='xxx' ) #ip,port,admin_password) > server.start() > print 'piep' > > and never says 'piep' :-( > > cheers, > Stef > > > > > On Aug 23, 2:16 pm, Stef Mientki <[email protected]> wrote: > >> thanks Massimo, > >> but it doesn't work by me ... > > >> On 23-08-2010 04:33, mdipierro wrote:> from gluon.main import HttpServer > > >> here the problem begin, .... > > >> Maybe I should start with a more basic question, > >> what should I do with the sources ? > >> I don't see a setup file, > >> so I just dumped the source files in the python site-packages > > >> site-packages\web2py\... > > >> is that enough ? > > >> thanks, > >> Stef

