You cannot expose it. You can re-recreate it. 

from gluon.shell import 
env; globals().update(env('yourappname',import_modules=True))

On Monday, 17 December 2012 10:11:47 UTC-6, Ian W. Scott wrote:
>
> I'm running a file like this:
>
>     python ~/web/web2py/web2py.py -S paideia -M -R 
> applications/paideia/bin/runtest.py
>
> Then I launch a subprocess from runtest.py like this:
>
>         proc = subprocess.Popen("py.test {}".format(test_dir),
>                                     stdout=subprocess.PIPE,
>                                     stderr=subprocess.PIPE,
>                                     shell=True)
>         stdout_val, stderr_val = proc.communicate()
>
> is there any way to expose the web2py environment from runtest.py to the 
> new subprocess?
>
>

-- 



Reply via email to