This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author lemburg
Recipients Arfrever, brett.cannon, eric.smith, eric.snow, lemburg, ncoghlan, pitrou
Date 2012-04-24.20:42:23
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <4F971027.2090205@egenix.com>
In-reply-to <1335299135.14.0.687406626788.issue14657@psf.upfronthosting.co.za>
Content
Brett Cannon wrote:
> 
> Brett Cannon <brett@python.org> added the comment:
> 
> So basically if you are running in a checkout, grab the source file and compile it manually since its location is essentially hard-coded and thus you don't need to care about sys.path and all the other stuff required to do an import, while using the frozen code for when you are running an installed module since you would otherwise need to do the search for importlib's source file to do a load at startup properly.

Right.

> That's an interesting idea. How do we currently tell that the interpreter is running in a checkout? Is that exposed in any way to Python code?

There's some magic happening in site.py for checkouts, but I'm not sure
whether any of that is persistent or even available at the time these
particular imports would happen.

Then again, I'm not sure you need to know whether you have a checkout
or not. You just need some flag to identify whether you want the
search for external module code to take place or not. sys.flags
could be used for that.
History
Date User Action Args
2012-04-24 20:42:24lemburgsetrecipients: + lemburg, brett.cannon, ncoghlan, pitrou, eric.smith, Arfrever, eric.snow
2012-04-24 20:42:23lemburglinkissue14657 messages
2012-04-24 20:42:23lemburgcreate