Python: replace '%' with str.format for examples & templates

Use modern/preferred string formatting for user facing scripts.
This commit is contained in:
Campbell Barton
2024-04-12 15:33:40 +10:00
parent 0bb6317035
commit 98986c6562
14 changed files with 25 additions and 26 deletions

View File

@@ -21,4 +21,4 @@ if "Cube" in bpy.data.meshes:
import os
with open(os.path.splitext(bpy.data.filepath)[0] + ".txt", 'w') as fs:
for image in bpy.data.images:
fs.write("%s %d x %d\n" % (image.filepath, image.size[0], image.size[1]))
fs.write("{:s} {:d} x {:d}\n".format(image.filepath, image.size[0], image.size[1]))