String slices
Paul St George
email at paulstgeorge.com
Fri Aug 9 10:13:27 EDT 2019
In the code (below) I want a new line like this:
Plane rotation X: 0.0
Plane rotation Y: 0.0
Plane rotation Z: 0.0
But not like this:
Plane rotation X:
0.0
Plane rotation Y:
0.0
Plane rotation Z:
0.0
Is it possible?
(I am using Python 3.5 within Blender.)
#
import os
outstream = open(os.path.splitext(bpy.data.filepath)[0] + ".txt",'w')
print(
"Plane rotation X:",bpy.data.objects["Plane"].rotation_euler[0],
"Plane rotation Y:",bpy.data.objects["Plane"].rotation_euler[1],
"Plane rotation Z:",bpy.data.objects["Plane"].rotation_euler[2],
file=outstream, sep="\n"
)
outstream.close()
More information about the Python-list
mailing list