我想使用文件 ctime 和 mtime 差异备份。但是,字典的设置值不支持多个
fileInfo = {'/root/py/backup_tar/backup.log': [1382945505.0, 1382945505.0], '/root/py/backup_tar/fileinfo.pk': [1382943020.0, 1382943020.0], '/root/py/backup_tar/test.tar.gz': [1382945505.0, 1382945505.0], '/root/py/backup_tar/file_backup.py': [1382944678.0, 1382944678.0], '/root/py/backup_tar/tar.py': [1382693438.0, 1382693438.0], '/root/py/backup_tar/test.pk': [1382945505.0, 1382945505.0]}
old_fileInfo = {'/root/py/backup_tar/tar.py': [1382693438.0, 1382693438.0], '/root/py/backup_tar/file_backup.py': [1382944678.0, 1382944678.0], '/root/py/backup_tar/test.pk': [1382945487.0, 1382945487.0], '/root/py/backup_tar/fileinfo.pk': [1382943020.0, 1382943020.0], '/root/py/backup_tar/backup.log': [1382945377.0, 1382945377.0]}
difference = dict(set(fileInfo.items())^set(old_fileInfo.items()))
fileNum = len(difference)
print fileNum
difference_file = ' '.join(difference.keys())
print difference_file
有谁知道我该如何解决这个问题?