[issue29850] file access, other drives

2017-03-19 Thread Gabriel POTTER

Gabriel POTTER added the comment:

Thanks a lot, that resolved it.

--
resolution:  -> works for me
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29850] file access, other drives

2017-03-19 Thread Paul Moore

Paul Moore added the comment:

As you see from the banner, your Python 3.6 is 32-bit but your Python 2.7 is 
64-bit.

I'd suggest you try 64-bit Python 3.6. This definitely looks like the SysWOW64 
issue Eryk described.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29850] file access, other drives

2017-03-19 Thread Gabriel POTTER

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 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29850] file access, other drives

2017-03-18 Thread Eryk Sun

Eryk Sun added the comment:

When you say "to be precise...C:/Windows/...System32", do you mean that this is 
the only directory that you've tested? If so, what you're seeing may be WOW64 
file-system redirection, if your 2.7 installation is 64-bit and 3.6 
installation is 32-bit, or vice versa. 

In a WOW64 process, accessing the %SystemRoot%\System32 directory in most cases 
gets redirected to the 32-bit system directory, %SystemRoot%\SysWOW64. You can 
access the native system directory via %SystemRoot%\SysNative.

--
nosy: +eryksun

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29850] file access, other drives

2017-03-18 Thread Paul Moore

Paul Moore added the comment:

Please provide a script reproducing this issue, and precise details of your 
Python version. It's extremely unlikely that the problem is as broad as you 
describe, as otherwise we'd have lots of reports of issues. But we'll need a 
more specific description to pinpoint the actual problem here.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29850] file access, other drives

2017-03-18 Thread Gabriel POTTER

New submission from Gabriel POTTER:

If python 3 is installed on another drive (for instance D:/), then it cannot 
access any C:/ files, but can access D:/ files.

I use:
open("C:/path/")
The same function did work under python 2.7 but now doesn't anymore.

That means that os.path.isfile, open(file) do not work.

Any help ?

--
components: Windows
messages: 289830
nosy: Gabriel POTTER, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: file access, other drives
type: behavior
versions: Python 3.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29850] file access, other drives

2017-03-18 Thread Gabriel POTTER

Gabriel POTTER added the comment:

To be precise, i cannot detect (only know if the file exist) any file located in
C:/Windows/... (in particulary System32)

contrary to Python 2.7 where it was possible.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com