On Thu, Aug 25, 2016 at 7:00 AM, eryk sun <eryk...@gmail.com> wrote: > I discovered why "Logs/con.txt" isn't working right in Windows 7, > while "Logs/nul.txt" does get redirected correctly to r"\\.\nul". > Prior to Windows 8 the console doesn't use an NT device, so the base > API has a function named BaseIsThisAConsoleName that looks for names > such as r"\\.CON", r"\\.CONIN$", "CON", or r"C:\Temp\con.txt" and > returns either "CONIN$" or "CONOUT$" if there's a match. A match for > just "CON" maps to one or the other of the latter depending on whether > read or write access is desired.
See? This is why *even after I tested it* I wasn't sure I was right! The rules are... complicated. ChrisA -- https://mail.python.org/mailman/listinfo/python-list