Is this Python 2 or 3? In Python 2 it means an attempt to perform a relative import failed but an absolute in succeeded, e.g. from idlelib you imported os, so import tried <a href="http://idlelib.is">idlelib.is</a> and then os. You should definitely consider using a future import to guarantee absolute imports.<br>
<br><div>On Wednesday, April 16, 2014 2:57:35 PM, Terry Reedy <<a href="mailto:tjreedy@udel.edu">tjreedy@udel.edu</a>> wrote:</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On 4/16/2014 12:25 PM, "Martin v. Löwis" wrote:<br>
> Am 14.04.14 23:51, schrieb Brett Cannon:<br>
>> It was realized during PyCon that since we are freezing importlib we<br>
>> could now consider freezing all the modules to cut out having to stat or<br>
>> read them from disk.<br>
> [...]<br>
>> Thoughts?<br>
><br>
> They still get read from disk, except that it is the operating system<br>
> that does the reading. So what you really save is the access to many<br>
> tiny files; something that can also be achieved with the zipfile import.<br>
> So I wonder how your all-frozen binary compares to a standard binary<br>
> with a python35.zip.<br>
><br>
> If it is comparable, I'd rather extend on that route, i.e. promote<br>
> putting the standard library into a zip file in the default<br>
> installation, and also find a way where (say) /usr/bin/hg could<br>
> conveniently specify a zip file that will contain the Mercurial<br>
> byte code. For example, we could support a -Z option for the interpreter<br>
> which would allow to append a zip file to a script that gets put on<br>
> sys.path.<br>
<br>
This could be useful for Idle also, as its startup is noticeably<br>
sluggish and could definitely stand to be zippier. About 50 Idle modules<br>
are imported in the user process and, I presume, at least as many in the<br>
Idle process.<br>
<br>
PS. In the user process sys.modules, there are numerous null entries<br>
like these:<br>
 >>> sys.modules['idlelib.os']<br>
 >>> sys.modules['idlelib.tokenize'<u></u>]<br>
 >>> sys.modules['<a href="http://idlelib.io" target="_blank">idlelib.io</a>']<br>
 >>> <etcetera><br>
<br>
Does anyone know the most likely reason?<br>
<br>
--<br>
Terry Jan Reedy<br>
<br>
<br>
______________________________<u></u>_________________<br>
Python-Dev mailing list<br>
<a href="mailto:Python-Dev@python.org" target="_blank">Python-Dev@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/python-dev" target="_blank">https://mail.python.org/<u></u>mailman/listinfo/python-dev</a><br>
Unsubscribe: <a href="https://mail.python.org/mailman/options/python-dev/brett%40python.org" target="_blank">https://mail.python.org/<u></u>mailman/options/python-dev/<u></u>brett%40python.org</a><br>
</blockquote>