[Python-modules-team] Bug#620551: Bug#620551: any resolution?

Yaroslav Halchenko debian at onerussian.com
Tue Jan 22 18:04:35 UTC 2013


On Tue, 22 Jan 2013, Jakub Wilk wrote:

> * Yaroslav Halchenko <debian at onerussian.com>, 2013-01-22, 12:28:
> >>One simple solution would be to run the script under the symlink
> >>path /usr/lib/pymodules/python2.6/ppworker.py.
> >>Then /usr/lib/pymodules/python2.6/ would be added (again) to
> >>sys.path, which is harmless.

> >FWIW that would not help apparently since

> >pp already does that:

> >DEBUG4:  ['/usr/bin/python', '-u', '/usr/lib/pymodules/python2.7/ppworker.py', '2>/dev/null']

> pp should call this instead:

> python -m ppworker

ah -- sounds like a good idea!

if I do not hear from Sandro against it -- I will patch/test/upload
within few days

> (This adds cwd to sys.path, so a chdiring to / first might be needed.)

> >--- a/ppworker.py
> >+++ b/ppworker.py
> >@@ -109,7 +109,17 @@ class _WorkerProcess(object):

> >if __name__ == "__main__":
> >        # add the directory with ppworker.py to the path
> >-        sys.path.append(os.path.dirname(__file__))

> Removing this line would be still needed.

yeah -- although -- shouldn't it be  benign since it just would add once
again the proper path, e.g.
/usr/lib/pymodules/python2.7
?
-- 
Yaroslav O. Halchenko
Postdoctoral Fellow,   Department of Psychological and Brain Sciences
Dartmouth College, 419 Moore Hall, Hinman Box 6207, Hanover, NH 03755
Phone: +1 (603) 646-9834                       Fax: +1 (603) 646-1419
WWW:   http://www.linkedin.com/in/yarik        



More information about the Python-modules-team mailing list