[issue7744] Allow site.addsitedir insert to beginning of sys.path

2014-09-10 Thread Michael R. Bernstein
Michael R. Bernstein added the comment: And in case it isn't clear how such a method would help, here is what the earlier code would look like: import os import site dirname = 'lib' dirpath = os.path.join(os.path.dirname(__file__), dirname) site.insertsitedir(1,

[issue7744] Allow site.addsitedir insert to beginning of sys.path

2014-09-09 Thread Michael R. Bernstein
Michael R. Bernstein added the comment: The lack of a left-append option for site.addsitedir(path), or an site.insertsitedir(index, path) (which is what I would consider a better solution), causes quite a few contortions on some hosted platforms, notably Google App Engine, for vendored

[issue7744] Allow site.addsitedir insert to beginning of sys.path

2011-06-26 Thread Jonas Meurer
Jonas Meurer jo...@freesources.org added the comment: I would be interested in that feature as well. It's currently impossible to use custom new versions of a python module by adding the directory with site.addsitedir in case a old version of the module is already installed in the python

[issue7744] Allow site.addsitedir insert to beginning of sys.path

2010-01-23 Thread Chris Withers
Chris Withers ch...@simplistix.co.uk added the comment: This sounds like something best taken to the python-ideas mailing list. Can you do that and update the issue with the outcome of any discussion? -- nosy: +cjw296 ___ Python tracker

[issue7744] Allow site.addsitedir insert to beginning of sys.path

2010-01-23 Thread Brian Curtin
Changes by Brian Curtin cur...@acm.org: -- priority: - normal stage: - test needed status: open - pending versions: +Python 2.7, Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7744

[issue7744] Allow site.addsitedir insert to beginning of sys.path

2010-01-20 Thread Chris Lasher
New submission from Chris Lasher chris.las...@gmail.com: Would it be possible to add an extra option to site.addsitedir so that it left-appends (inserts at the beginning of the list rather than the end of the list) to sys.path the new path? The use case for this is that sometimes the user has

[issue7744] Allow site.addsitedir insert to beginning of sys.path

2010-01-20 Thread Chris Lasher
Chris Lasher chris.las...@gmail.com added the comment: One correction: by beginning of sys.path, what I really mean is, the portion of sys.path after the initial ''. I forgot that '', the empty path, should always be at the start of sys.path to ensure that packages and modules in the current