Am 12.11.2012 19:30 schrieb Hans Mulder:

This will break if there are spaces in the file name, or other
characters meaningful to the shell.  If you change if to

         xargsproc.append("test -f '%s/{}'&&  md5sum '%s/{}'"
                              % (mydir, mydir))

, then it will only break if there are single quotes in the file name.

And if you do mydir_q = mydir.replace("'", "'\\''") and use mydir_q, you should be safe...


Thomas
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to