On Thu, Mar 17, 2011 at 3:04 PM, Carl Meyer <c...@oddbird.net> wrote: > On 03/17/2011 03:00 PM, P.J. Eby wrote: >> At 01:41 PM 3/17/2011 -0400, Carl Meyer wrote: >>> Actually, now that I come to think of it, pythonv (take two) does >>> already cover your requirement. If you have a symlinked or copied python >>> binary, and an empty pythonv.conf one directory up, >> >> Is there any reason why the configuration file has to be one directory >> up, intead of adjacent to the executable? > > Not a particularly good one. I inherited this from the standard layout > of virtualenv, which includes a bin/ directory for the python binary and > scripts, and it made more sense to me in that layout for pythonv.conf to > live at the root of the "virtualenv" rather than in bin/. > > I'd like to continue to support it being one level up, but I can't think > of any reason not to first check adjacent, and then one level up. I > suppose it could just keep checking up the tree, but that introduces a > bunch more filesystem checks and could give surprising results. I won't > do that unless someone steps up to give convincing arguments for it.
I suggest the following: Look for argv[0]+'.pythonv' and then for '../pythonv.cfg'. So if I've linked the Python executable to ./bin/clean, look for ./bin/clean.pythonv and ./pythonv.cfg. Jim -- Jim Fulton http://www.linkedin.com/in/jimfulton _______________________________________________ Distutils-SIG maillist - Distutils-SIG@python.org http://mail.python.org/mailman/listinfo/distutils-sig