Movatterモバイル変換
[0]ホーム
why does activestate (win98) python not support globbing
Marcin 'Qrczak' Kowalczykqrczak 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 onlygets its result and can't recover the spelling of the expressionused to compute it.It's similar for commandline arguments. The list of files doesn't needto be written explicitly: it can come from expanding variables, fromglobbing patterns, from substitution of output of some other command,from arithmetic computation etc. You can't expect applications to doall this. This is the job of whoever calls your program to generatearguments, e.g. the shell. The user just tells the shell how togenerate them using the shell's language, which includes variables,wildcards etc.-- __("< Marcin Kowalczyk *qrczak at knm.org.plhttp://qrczak.ids.net.pl/ \__/ ^^ SYGNATURA ZASTĘPCZAQRCZAK
More information about the Python-listmailing list
[8]ページ先頭