Hi list,
My problem is that: since when using apache + mod_wsgi I got a neutral env
for my server (e.g. PATH=/usr/bin:/bin) but in the end what I need is all
the envs that is in a particular $HOME/.bashrc file in order to when server
spawns a program (that may not be in the neutral PATH and besides need some
extra env parameters) it can run.

So what I was trying is to find a python module or code that would do
something like ". $HOME/basrc" inside my python code and before executing my
binary program in order to pass to it the particular user's environment.

My program is called with os.spawnvp(os.P_NOWAIT, program, args) and a
simple os.system(". $HOME/basrc") before spawning it doesn't work.

What works is to do os.putenv('PATH', 'blabla'), but then I have to do it
for every key in my bashrc file (not only silly but unmaintainable).

So if someone understood my problem and could give some tip on that, it
would be very much appreciated.

Many thanks in advance.

Alan

-- 
Alan Wilter S. da Silva, D.Sc. - CCPN Research Associate
Department of Biochemistry, University of Cambridge.
80 Tennis Court Road, Cambridge CB2 1GA, UK.
>>http://www.bio.cam.ac.uk/~awd28<<

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to