Gabriel POTTER added the comment:

Thanks for your answers. I'll try to be as precise as possible.

The problem i have is really specific:
I have a custom file, that i added in C:/Windows/System32/

I have a Windows 10 x64 computer, with 2 versions of python installed:
- Python 2.7, in C:\Python27
- Python 3.6, in D:\Programms\Python3

I use a sample of code with the two different versions:

* With Python 2.7:

Python 2.7.12 (v2.7.12:d33e0cf91556, Jun 27 2016, 15:24:40) [MSC v.1500 64 bit 
(AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> os.path.isfile(os.path.normpath("C:/Users/gpotter/Desktop/test.txt"))
True
>>> os.path.isfile(os.path.normpath("C:/Windows/System32/cmd.exe"))
True
>>> os.path.isfile(os.path.normpath("C:/Windows/System32/windump.exe"))
True
>>> os.path.isfile(os.path.normpath("C:/Windows/System32/do_not_exist.stg"))
False


* Now, with Python 3.6:

Python 3.6.0 (v3.6.0:41df79263a11, Dec 23 2016, 07:18:10) [MSC v.1900 32 bit 
(Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> os.path.isfile(os.path.normpath("C:/Users/gpotter/Desktop/test.txt"))
True
>>> os.path.isfile(os.path.normpath("C:/Windows/System32/cmd.exe"))
True
>>> os.path.isfile(os.path.normpath("C:/Windows/System32/windump.exe"))
False
>>> os.path.isfile(os.path.normpath("C:/Windows/System32/do_not_exist.stg"))
False

As you can see, Python 2.7 acts normally for everything. Python 3.6 does detect 
cmd.exe as a correct file, but do not detects windump.exe, the file that I 
added manually.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue29850>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to