A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2010-February/097493.html below:

[Python-Dev] __file__ is not always an absolute path

[Python-Dev] __file__ is not always an absolute path [Python-Dev] __file__ is not always an absolute pathAntoine Pitrou solipsis at pitrou.net
Sun Feb 7 20:05:14 CET 2010
Barry Warsaw <barry <at> python.org> writes:
> 
> >exarkun <at> boson:~$ python -m timeit -s 'from os import getcwd' 'getcwd()'
> >1000000 loops, best of 3: 1.02 usec per loop
[...]
> 
> I'd like to see the effect on command line scripts that are run often and then
> exit, e.g. Bazaar or Mercurial.  Start up time due to import overhead seems to
> be a constant battle for those types of projects.

If os.getcwd() is only called once when "normalizing" sys.path, and if it just
takes one microsecond, I don't really see the point. :-)


Antoine.


More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4