[prev in list] [next in list] [prev in thread] [next in thread] 

List:       python-ideas
Subject:    Re: [Python-ideas] Policy for altering sys.path
From:       Thomas Güttler <guettliml () thomas-guettler ! de>
Date:       2015-05-11 8:42:16
Message-ID: 55506B68.90504 () thomas-guettler ! de
[Download RAW message or body]

Hi,

for this case, the sys.path modification was solved like this:


-sys.path = glob.glob(os.path.join(WHEEL_DIR, "*.whl")) + sys.path
+sys.path[:] = glob.glob(os.path.join(WHEEL_DIR, "*.whl")) + sys.path

See https://github.com/pypa/pip/issues/2759



Am 06.05.2015 um 16:05 schrieb Thomas Güttler:
> I am missing a policy how sys.path should be altered.
> 
> We run a custom sub class of list in sys.path. We set it in sitecustomize.py
> 
> This instance get replace by a common list in lines like this:
> 
> sys.path = glob.glob(os.path.join(WHEEL_DIR, "*.whl")) + sys.path
> 
> The above line is from pip, it similar things happen in a lot of packages.
> 
> Before trying to solve this with code, I think the python community should agree an \
> a policy for altering sys.path. 
> What can I do to this done?
> 
> We use Python 2.7.
> 
> 
> Related: http://bugs.python.org/issue24135
> 
> Regards,
> Thomas Güttler
> 
> _______________________________________________
> Python-ideas mailing list
> Python-ideas@python.org
> https://mail.python.org/mailman/listinfo/python-ideas
> Code of Conduct: http://python.org/psf/codeofconduct/
_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic