<br><br><div class="gmail_quote">On Mon, May 17, 2010 at 2:04 PM, Nima Mohammadi <span dir="ltr"><<a href="mailto:nima.irt@gmail.com">nima.irt@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
On May 18, 12:30 am, geremy condra <<a href="mailto:debat...@gmail.com">debat...@gmail.com</a>> wrote:<br>
<div class="im">> On Mon, May 17, 2010 at 1:05 PM, Nima <<a href="mailto:nima....@gmail.com">nima....@gmail.com</a>> wrote:<br>
> > Well, I tried to run Python with -v option. It seems that python26.zip is<br>
> > partially loaded but can't be used, because zlib is "unavailable".<br>
><br>
</div><div class="im">> is the zlib module among the files you've compressed?<br>
><br>
> Geremy Condra<br>
<br>
</div>zlib.so is a shared library which is in the /lib/python2.6/lib-<br>
dynload/ directory.<br></blockquote><div><br></div><div><br></div><div>Yes, but you're not running python from say, /bin; if you were, it might go out and look in /lib and such to find files. You're running it from a local directory, ./bin/python. Thus, its finding its "center" (where the executable is installed), and from there building a search path. </div>
<div><br></div><div>Its center -- PYTHONHOME -- is /home/nima/py; from there, it adds /home/nima/py/lib-dynload among other search paths.</div><div><br></div><div>So: zlib.so needs to be in /home/nima/py/lib-dynload. If its not, then it won't be able to decompress python26.zip into memory.</div>
<div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
In PEP 273 is noted that:<br>
<br>
> Any files may be present in the zip archive, but only files<br>
> *.py and *.py[co] are available for import. Zip import of<br>
> dynamic modules (*.pyd, *.so) is disallowed.<br>
<br>
<a href="http://www.python.org/dev/peps/pep-0273/" target="_blank">http://www.python.org/dev/peps/pep-0273/</a></blockquote><div><br></div><div>He knows, he was wondering if you accidentally zipped up zlib.so in the zip, basically. I think :)</div>
<div><br></div></div><div name="mailplane_signature">--S</div>