On Fri, Sep 19, 2014 at 12:45 AM, Chris Angelico <ros...@gmail.com> wrote: > On Fri, Sep 19, 2014 at 3:45 PM, Steven D'Aprano >> s = '\0'.join([thishost, md5sum, dev, ino, nlink, size, file_path]) >> print s > > That won't work on its own; several of the values are integers. So > either they need to be str()'d or something in the output system needs > to know to convert them to strings. I'm inclined to the latter option, > which simply means importing print_function from __future__ and > setting sep=chr(0).
Personally, I lean toward converting them with map in this case: s = '\0'.join(map(str, [thishost, md5sum, dev, ino, nlink, size, file_path])) -- https://mail.python.org/mailman/listinfo/python-list