- print >>f, "root:x:0:0:root:/root:/bin/bash"
- print >>f, "{0}:x:{1}:{2}:,,,:/data:/bin/false".format(name, userpw.pw_uid, userpw.pw_gid)
+ print("root:x:0:0:root:/root:/bin/bash", file=f)
+ print("{0}:x:{1}:{2}:,,,:/data:/bin/false".format(name, userpw.pw_uid, userpw.pw_gid), file=f)