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.

Title: not found
Type: behavior Stage: resolved
Components: Windows Versions: Python 2.5
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: ajaksu2, ggenellina, openspirito
Priority: normal Keywords:

Created on 2007-06-11 09:33 by openspirito, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (5)
msg32301 - (view) Author: (openspirito) Date: 2007-06-11 09:33
Under my configuration (Python 2.5.1 (r251:54863, Apr 18 2007, 08:51:08) [MSC v.1310 32 bit (Intel)] on win32) the is not found in the current directory. I added some testing code into site.def execsitecustomize() and found out, that the current path is not part of sys.path, but later on in the main program it is.
msg32302 - (view) Author: Gabriel Genellina (ggenellina) Date: 2007-06-14 07:43
I don't think that allowing to be run from the current directory would be a good idea, as it gets executed automatically on any invocation of the Python program (and it could contain arbitrary code).

You can put inside Lib or Lib\site-packages and it will be picked fine.
msg32303 - (view) Author: (openspirito) Date: 2007-06-14 08:53
It worked like this in all previous versions of Python. I think it is very useful e.g. if you work with development versions of other libraries. Better than adding import paths via sys.path += ['abc'] at the top of Python scripts. Or is there another or better way to add project specific import paths?

But at least there should be a notice in the documentation of Python 2.5 that this behaviour changed. I spend some time to find out that it was changed.
msg32304 - (view) Author: Gabriel Genellina (ggenellina) Date: 2007-06-21 01:44
This is due to patch <>
and is documented in the NEWS.txt file for 2.5:

- Patch #1232023: Stop including current directory in search
  path on Windows.
msg85627 - (view) Author: Daniel Diniz (ajaksu2) * (Python triager) Date: 2009-04-06 09:47
Closing as it's a documented change.
Date User Action Args
2022-04-11 14:56:24adminsetgithub: 45080
2009-04-06 09:47:13ajaksu2setstatus: open -> closed

type: behavior

nosy: + ajaksu2
messages: + msg85627
resolution: not a bug
stage: resolved
2007-06-11 09:33:44openspiritocreate