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.21:46:20
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <4F971F28.4050108@egenix.com>
In-reply-to <1335301995.55.0.753268342375.issue14657@psf.upfronthosting.co.za>
Content
Brett Cannon wrote:
> 
> Modules/getpath.c seems to be where the C code does it when getting paths for sys.path. So it would be possible to use that same algorithm to set some sys attribute (e.g. in_checkout or something) much like sys.gettotalrefcount is optional and only shown when built with --with-pydebug. Otherwise some directory structure check could be done (e.g. find importlib/_bootstrap.py off of sys.path, and then see if ../Modules/Setup or something also exists that would never show up in an installed CPython).

Why not simply use a flag that get's set based on an environment
variable, say PYTHONDEVMODE ?

Adding more cruft to getpath.c or similar routines is just going to
slow down startup time even more...

Python 2.7 has a startup time of 70ms on my machine; compare that to
Python 2.1 with 10ms and
Perl 5 with just 4ms.
History
Date User Action Args
2012-04-24 21:46:20lemburgsetrecipients: + lemburg, brett.cannon, ncoghlan, pitrou, eric.smith, Arfrever, eric.snow
2012-04-24 21:46:20lemburglinkissue14657 messages
2012-04-24 21:46:20lemburgcreate