Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!weretis.net!feeder4.news.weretis.net!rt.uk.eu.org!newsfeed.xs4all.nl!newsfeed1a.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.004 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'subject:Python': 0.06; 'matches': 0.07; 'builtin': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'subject:2.7': 0.09; 'subject:files': 0.09; 'python': 0.11; 'clues': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'files.': 0.16; 'wrote:': 0.18; 'trying': 0.19; 'import': 0.22; 'header:User-Agent:1': 0.23; 'header:X-Complaints-To:1': 0.27; 'header:In-Reply-To:1': 0.27; 'installed': 0.27; 'loading': 0.31; 'python2.7': 0.31; 'there': 0.35; 'installing': 0.36; 'behind': 0.37; 'application': 0.37; 'starting': 0.37; 'to:addr:python-list': 0.38; 'files': 0.38; 'pm,': 0.38; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'provide': 0.64; 'more': 0.64; 'details': 0.65; 'minutes': 0.67; 'received:12': 0.81; 'precompiled': 0.84; 'skip:/ 30': 0.84 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Emile van Sebille Subject: Re: Python 2.7 importing pyc files without py files Date: Wed, 19 Feb 2014 14:25:41 -0800 References: <8a6aff2d-777a-4f80-8c26-6d1a586e6c5c@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: 12.184.110.78 User-Agent: Mozilla/5.0 (Windows NT 6.2; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0 In-Reply-To: <8a6aff2d-777a-4f80-8c26-6d1a586e6c5c@googlegroups.com> X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 35 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1392848757 news.xs4all.nl 2856 [2001:888:2000:d::a6]:38420 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:66722 On 2/19/2014 2:03 PM, Mircescu Andrei wrote: > If there are only pyc files, the loading time of the application is > much more than if I have pyc and py files. It is behind with 2 > minutes more than if it had py files You may get some clues by starting python as /path/to/python/python2.7 -vv which will provide the details of attempts to import: [root@vsds4 log]# python2.7 -vv # installing zipimport hook import zipimport # builtin # installed zipimport hook # trying /usr/local/lib/python2.7/site.so # trying /usr/local/lib/python2.7/sitemodule.so # trying /usr/local/lib/python2.7/site.py # /usr/local/lib/python2.7/site.pyc matches /usr/local/lib/python2.7/site.py import site # precompiled from /usr/local/lib/python2.7/site.pyc # trying /usr/local/lib/python2.7/os.so # trying /usr/local/lib/python2.7/osmodule.so # trying /usr/local/lib/python2.7/os.py # /usr/local/lib/python2.7/os.pyc matches /usr/local/lib/python2.7/os.py import os # precompiled from /usr/local/lib/python2.7/os.pyc ... HTH, Emile