Perform some action before pserve

2012-10-24 Thread Mark Huang
Hi, I want to set some environment variables on my Ubuntu machine before I run pserve command. Reason that it's not set in the ini file is because a particular python file in my Pyramid web application has no access to request parameter to retrieve the settings. I was thinking of overriding

Re: Perform some action before pserve

2012-10-24 Thread 薛 斌雷
http://docs.pylonsproject.org/projects/pyramid/en/1.4-branch/narr/environment.html#environment-chapter something like this. $ PYRAMID_DEBUG_AUTHORIZATION=1 PYRAMID_RELOAD_TEMPLATES=1 \ bin/paster serve MyProject.ini does it meet your requirements? On Oct 24, 2012, at 11:01 PM, Mark Huang

Re: Perform some action before pserve

2012-10-24 Thread Jonathan Vanasco
For staging/production, I tend to write startup scripts per machine. For a while i was doing shell scripts, but then I started using Fabric. For local development, i have a 'source' file , that typically does this: 1. cd path_to_pyramidapp 2. source path_to_virtualenv/bin/activate 3.

Re: Perform some action before pserve

2012-10-24 Thread Benjamin Sims
For this purpose, I use virtualenvwrapper. You can then put everything into your postactivate file (in /bin) and it will be run automatically. -- Sent from my phone On 24 Oct 2012, at 19:44, Jonathan Vanasco jonat...@findmeon.com wrote: For staging/production, I tend to write startup