Sorry that I was kept busy for a few days and did not feedback earlier. Massimo's fix works. Now web2py.py -f another_web2py_folder can serve applications in that another_web2py_folder/applications/*
Thadeus, in most cases we don't need two instances of web2py running same app code. But there is always an exception to any rule. In my first post in this thread, I use both web2py_src (latest trunk) and web2py_exe to run same app, because the former does not run cron due to my lack of python_win32. And I think this trick also simplify my life when testing same app on web2py_old and web2py_latest, in case web2py_latest introduced some bug. Iceberg On Apr8, 11:44pm, Thadeus Burgess <[email protected]> wrote: > Iceberg, > > I am confused as to why you have two instances of web2py running the > same app code? > > Unless they can use separate routes? > > -Thadeus > > > > On Thu, Apr 8, 2010 at 10:22 AM, mdipierro <[email protected]> wrote: > > I am not sure about routes because I am not sure whether routes is > > executed before of after the change of path. > > Should be tried and eventually we can fix it. > > > On Apr 8, 10:16?am, Thadeus Burgess <[email protected]> wrote: > >> Does that mean it will use "other_web2py" routes.py and the like? > > >> -Thadeus > > >> On Thu, Apr 8, 2010 at 1:18 AM, mdipierro <[email protected]> wrote: > >> > here is how it works now (its was more convoluted before) > > >> > web2py must find gluon folder in path. > >> > it also expects to find applications/ in os.environ['web2py_path'] or > >> > in os.getcwd(). > > >> > -f path sets os.environ['web2py_path'] = path > > >> > Massimo > > >> > On Apr 8, 12:17?am, mdipierro <[email protected]> wrote: > >> >> I only took a quick look and I think I fixed it but please take a > >> >> second look. > > >> >> The syntax is: > > >> >> -f /home/another_web2py > > >> >> Massimo > > > >> >> > > > > On Wed, Apr 7, 2010 at 10:44 AM, Iceberg <[email protected]> > >> >> > > > > wrote: > >> >> > > > > > Hi, do you pals know when and how to use command line option > >> >> > > > > > -f > >> >> > > > > > FOLDER? I hope to hear some experience. > > >> >> > > > > > My major web2py develop environment used to be a web2py > >> >> > > > > > source version > >> >> > > > > > freshly from latest trunk, on Windows XP, but without win32 > >> >> > > > > > extention > >> >> > > > > > (why bothers). But today I have to use a web2py windows > >> >> > > > > > binary version > >> >> > > > > > as a workaround due to the cron feature. Detail is available > >> >> > > > > > here: > >> >> > > > > >https://groups.google.com/group/web2py/browse_frm/thread/7d577b75534f... > > >> >> > > > > > So it seems my apps must be duplicated for the two web2py > >> >> > > > > > version home > >> >> > > > > > folder. But that is inconvenient to maintain. Therefore I am > >> >> > > > > > looking > >> >> > > > > > for a way to let the two (or more) copies of web2py share same > >> >> > > > > > applications folder. On windows, we don't have "ln -s". But > >> >> > > > > > web2py > >> >> > > > > > looks like having builtin solution. > > >> >> > > > > > ?-f FOLDER, --folder=FOLDER > >> >> > > > > > ? ? ? ? ? ? ? ? ? ? ? ?folder from which to run web2py > > >> >> > > > > > However, even I start web2py like this: > >> >> > > > > > ?C:\> cd \my\first\web2py > >> >> > > > > > ?C:\> web2py.py -a1 -f C:\my\another\web2py > >> >> > > > > > the web2py starts, serves, but still only hosting apps under > >> >> > > > > > the "\my > >> >> > > > > > \first\web2py\applications", not those under > >> >> > > > > > "\my\another\web2py > >> >> > > > > > \applications". > > >> >> > > > > > So, is -f FOLDER supposed to do what I want? > > >> >> > > > > > Regards, > >> >> > > > > > Iceberg -- Subscription settings: http://groups.google.com/group/web2py/subscribe?hl=en

