python 2.7.12 on Linux behaving differently than on Windows

eryk sun eryksun at gmail.com
Wed Dec 7 08:07:17 EST 2016


On Wed, Dec 7, 2016 at 8:30 AM, Steven D'Aprano
<steve+comp.lang.python at pearwood.info> wrote:
>
> There are Windows programs which understand globs, like dir. Do you honestly
> expect us to believe that it is okay to use "dir a*" on Windows because dir
> itself expands the glob, but not okay to use "dir a*" on Linux because the
> shell has expanded the glob before dir sees it?

"dir" is a built-in shell command. But yes, there are programs that
understand globbing. A C/C++ program can link with wsetargv.obj to get
this feature. That said, I hadn't actually ever used this feature
prior to reading this thread. I linked it into a custom of python.exe,
and I'm not happy with the implementation because it doesn't allow
escaping wildcards (confirmed in the source distributed with VS 2015).

> latest step is Microsoft's partnership with Canonical (the company behind
> Ubuntu Linux) to bring bash to Windows.

The partnership with Canonical is to provide an entire Linux
distribution, sans the kernel. The Windows Subsystem for Linux (WSL)
works by translating Linux system calls to the NT kernel. It directly
executes unmodified ELF binaries. I think it was a mistake to call it
"bash on Windows". It seems like people think it's just a Windows port
of bash.



More information about the Python-list mailing list