Hi,

I'm again confused by a packages program accessing installed Python module (see below). I digged into it and found out that the Pythin interpreter is searching for it's installation prefix. This is done in Modules/getpath.c.

At first this is only confusion. But at second, this make `encodings` to be imported from an installed Python.

What do you think about setting PYTHONHOME="" in the loader?

So see the effect, run e.g.

PYTHONPATH= PYTHONVERBOSE=1 \
strace -f -e trace=file /tmp/hanoi/t1/dist/hanoi/hanoi 2>&1 | less -S

and

PYTHONPATH= PYTHONVERBOSE=1 PYTHONHOME=/tmp/hanoi/t1/dist/hanoi/ \
strace -f -e trace=file /tmp/hanoi/t1/dist/hanoi/hanoi 2>&1 | less -S

--
Schönen Gruß - Regards
Hartmut Goebel
Dipl.-Informatiker (univ.), CISSP, CSSLP

Goebel Consult
Spezialist für IT-Sicherheit in komplexen Umgebungen
http://www.goebel-consult.de

Monatliche Kolumne: http://www.cissp-gefluester.de/
Goebel Consult ist Mitglied bei http://www.7-it.de
Blog: http://www.goebel-consult.de/blog/neues-aus-meiner-toolbox-pdfjoin-droplet


Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to