python 2.7.12 on Linux behaving differently than on Windows
lew.pitcher at digitalfreehold.ca
Thu Dec 8 11:55:36 EST 2016
On Thursday December 8 2016 11:48, in comp.lang.python, "Random832"
<random832 at fastmail.com> wrote:
> On Wed, Dec 7, 2016, at 15:29, Lew Pitcher wrote:
>> But, point of fact is that the feature to disable globbing is not often
>> needed. Most Unix programs that accept filenames are happy to accept a
>> list of filenames. There is not much call for a program to perform it's own
>> globbing, like is required in Windows.
>> In fact, I can only think of three Unix "commandline" programs that need
>> shell globbing disabled:
>> find - which performs it's own filename matching
>> grep - which uses regular expressions to search the contents of files,
>> sed - which uses regular expressions to edit the contents of files.
>> (I'm sure that there are a few more examples, though).
> tar can do its own filename matching in some contexts, to match files
> inside the archive for example.
> 7z does its own filename matching to allow distinguishing "extract from
> multiple archives" [x \*.zip] from "extract a list of filenames from a
> single archive" [x a.zip b.zip] - a BartC-compliant command line
> paradigm if I ever saw one. I suspect it also allows you to match files
> inside the archives in the list part.
> scp lets you pass glob patterns to be matched on the remote server.
> also, quoting for scp is somewhat unpleasant, since metacharacters in
> general, not just globs but also $variables, quotes,`commands` etc, are
> interpreted by both the local shell and the remote shell. sftp is a
> little more sane, but still has remote globs for fetching, and quotes to
> escape those globs.
True. I had forgotten those.
Still, it's a short list of programs that either need to do their own
globbing, or need the shell to NOT glob for them.
"In Skills, We Trust"
PGP public key available upon request
More information about the Python-list