why does activestate (win98) python not support globbing
Marcin 'Qrczak' Kowalczyk
qrczak at knm.org.pl
Sun Apr 15 05:55:08 EDT 2001
Fri, 13 Apr 2001 15:31:23 GMT, Robert Amesz <rcameszREMOVETHIS at dds.removethistoo.nl> pisze:
> Why nasty? This is one instance were I think UNIX has got it wrong.
> It's much better to leave commandline parameters alone than to try and
> interpret them in a particular way. Explicit is better than implicit.
This would mean that in a statement like
self.write(PERSID + str(pid) + '\n')
the write function should perform the parsing of the expression
"PERSID + str(pid) + '\n'", while for me it's obvious that it only
gets its result and can't recover the spelling of the expression
used to compute it.
It's similar for commandline arguments. The list of files doesn't need
to be written explicitly: it can come from expanding variables, from
globbing patterns, from substitution of output of some other command,
from arithmetic computation etc. You can't expect applications to do
all this. This is the job of whoever calls your program to generate
arguments, e.g. the shell. The user just tells the shell how to
generate them using the shell's language, which includes variables,
wildcards etc.
--
__("< Marcin Kowalczyk * qrczak at knm.org.pl http://qrczak.ids.net.pl/
\__/
^^ SYGNATURA ZASTĘPCZA
QRCZAK
More information about the Python-list
mailing list