Message146154
> Yes, you have to be careful that "dirname" is legal in the shell, but
> that usually isn't a big problem in practice, because dirname came
> from a previous listdir call, or you otherwise know that it's valid to
> interpolate it into the command
I don't understand. os.listdir() doesn't escape filenames for you.
Having been bitten several times by almost-working shell commands which
would crash when one of the 10000 files being processed had a space in
it (ironically, I think that was in the Python source tree with some of
the old Mac directories), I think we really don't want to publish a
function which encourages people to pass unescaped arguments to the
shell. |
|
Date |
User |
Action |
Args |
2011-10-22 00:41:43 | pitrou | set | recipients:
+ pitrou, ncoghlan, eric.araujo, alex, cvrebert |
2011-10-22 00:41:41 | pitrou | link | issue13238 messages |
2011-10-22 00:41:40 | pitrou | create | |
|