One other consideration in regards to globbing in the argument list: there's a static limit to the byte length of argv. On windows, it's 8191 bytes (I'm assuming a null-terminator brings that to 8192, which is a weird 2**13). For Linux, as of kernal 2.6.25, apparently, the limit is 131072 bytes, an equally odd choice of 2**17 bytes.
I'm not sure if globs directly to commands bypass these restrictions, but I've seen real world issues with build systems with thousands of files that attempted to pass all dependencies to a target that blew up spectacularly (one of the reasons cl & link on windows accept argument files as input instead of just command line arguments). Regards, Nate On Tue, Dec 6, 2016 at 4:24 PM, Chris Angelico <ros...@gmail.com> wrote: > On Wed, Dec 7, 2016 at 8:46 AM, Cameron Simpson <c...@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 > -- > https://mail.python.org/mailman/listinfo/python-list > -- https://mail.python.org/mailman/listinfo/python-list