python 2.7.12 on Linux behaving differently than on Windows

Chris Angelico rosuav at gmail.com
Tue Dec 6 17:24:33 EST 2016


On Wed, Dec 7, 2016 at 8:46 AM, Cameron Simpson <cs at zip.com.au> wrote:
> Nothing prevents you writing an extremely simple shell yourself you know. It
> needn't expand anything. _Or_ you could have it adopt the inverse
> convention: expand nothing unless asked. Eg:
>
>  cp G:*.c
>
> to cause "*.c" to get expanded. Of course, because the various executables
> don't feel any burden to implement globbing you may run into some impedence
> mismatch.

I actually have something like this in one application's inbuilt
command executor - it does globbing ONLY if the parameter starts with
a question mark (eg "?*.c" will glob "*.c" in that directory). It's
deliberate, but frankly, it ends up annoying more often than not. I'm
considering switching to a more normal way of doing it.

ChrisA


More information about the Python-list mailing list