[issue12362] General Windows stdout redirection not working

2011-06-19 Thread CrouZ

New submission from CrouZ :

Steps to repeat:
* Create the script foo.py consisting of the line: print("foo")
* Run: foo.py > bar

Behavior:
 2.7.2: The file bar is created but empty. Prints the following message on exit:

close failed in file object destructor:
sys.excepthook is missing
lost sys.stderr

 3.1.4: The file bar is created but empty. No printouts indicating that 
something went wrong.

Expected behavior:
 All: The file bar has the content foo.

Additional information:
 sys.stdout, and probably also sys.stderr, do not appear to be set up properly.
  2.7.2: stdout is set to a file but performing any operations on it throws the 
exception: IOError: [Errno 9] Bad file descriptor
  3.1.4: stdout is set to None

Workaround:
 All: python foo.py > bar

Used software:
 Windows 7 Ultimate SP1 x64 (6.1.7601)
 Python 2.7.2 and 3.1.4 installed with the msi-installer including Registering 
Extensions.

--
components: Windows
messages: 138626
nosy: CrouZ
priority: normal
severity: normal
status: open
title: General Windows stdout redirection not working
type: crash
versions: Python 2.7, Python 3.1

___
Python tracker 
<http://bugs.python.org/issue12362>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue12362] General Windows stdout redirection not working

2011-06-19 Thread CrouZ

Changes by CrouZ :


--
type: crash -> behavior

___
Python tracker 
<http://bugs.python.org/issue12362>
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38822] Inconsistent os.stat behavior for directory with Access Denied

2019-11-16 Thread CrouZ


New submission from CrouZ :

After upgrading some scripts from Python 2.7 to 3.7 in Windows 10, I got 
different behavior that seems to be caused by inconsistent behavior for os.stat 
in Python 3.7.

Python 2.7:
>>> os.stat("D:\\System Volume Information")
nt.stat_result ...
>>> os.stat("D:\\System Volume Information\\")
nt.stat_result ... (same as previous call)

Python 3.7:
>>> os.stat("D:\\System Volume Information")
os.stat_result ...
>>> os.stat("D:\\System Volume Information\\")
Traceback ...
PermissionError: [WinError 5] Access is denied: 'D:\\System Volume 
Information\\'



What I really do is calling:
>>> os.path.exists("D:\\System Volume Information\\")
False (Unexpected and inconsistent. I expect the return value to be True.)

Behavior for other calls:
>>> os.path.exists("D:\\System Volume Information")
True (OK)
>>> os.path.isdir("D:\\System Volume Information\\")
True (OK, but according to the documentation "Return True if path is an 
existing directory." where 'existing' links to os.path.exists, which returns 
False)

The closest issue I could find was Issue28075 which has already been fixed.

--
components: Windows
messages: 356763
nosy: CrouZ, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Inconsistent os.stat behavior for directory with Access Denied
type: behavior
versions: Python 3.7

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



[issue38822] Inconsistent os.stat behavior for directory with Access Denied

2021-01-09 Thread CrouZ


CrouZ  added the comment:

The problem exists in Python 3.8 as well, with the difference that 
``os.path.isdir("D:\\System Volume Information\\")`` also returns False.

Tested with Python 3.8.2 and 3.8.7.

--
versions: +Python 3.8

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



[issue38822] Inconsistent os.stat behavior for directory with Access Denied

2021-02-21 Thread CrouZ


CrouZ  added the comment:

The problem exists in Python 3.9 as well, and it behaves the same as Python 3.8.

Tested with Python 3.9.1.

--
versions: +Python 3.9

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