Serhiy Storchaka added the comment:

What about zipimport? It doesn't use __pycache__ directories, but just try to 
read *.pyc file, then *.py file.

The launcher on Windows also check magic number (it contains a mapping from 
magic numbers to Python versions).

----------
nosy: +serhiy.storchaka

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue26042>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to