On 15/08/11 00:39, cd34 wrote:
you can do:
#!/path/to/virtualenv/bin/python
in your startup script which will cause the script to load from that
environment. Cron jobs are often run this way.
At that point, you might also choose to update your environment:
import os, sys, site
sys.path.append('/path/to/pyramid/project')
site.addsitedir('/path/to/pyramid/lib/python2.6/site-packages')
Thanks a lot for this pointer.
However there is a small problem in this case.
before I initiate the serving of my pylons app from the vertual
environment, I have to start another service, this one being a twisted
server for xmlrpc.
The core logic has been written long before and its stable.
'So we did not choose to remove it, instead our pylons controllers talk
as an agent to the APIs in this xmlrpc service.
So the bottom line is that the rpc engine has to be run using system
level python (I have the sudo permissions for this ).
Now given this fact, how can I have a single python script first run the
code to start the rpc server and then divert the path to another python
instance inside the venv and server the web app?
Happy hacking.
Krishnakant.
--
You received this message because you are subscribed to the Google Groups
"pylons-discuss" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/pylons-discuss?hl=en.