Skip to content
Browse files

Minor tweaks, commenting, going to wait for AnvilChunk before pulling.

  • Loading branch information...
1 parent 218b7f3 commit c7232f3b4632d84ee451e141863839eb10f6eac9 @stumpylog committed Apr 13, 2012
Showing with 3 additions and 1 deletion.
  1. +3 −1 examples/map.py
View
4 examples/map.py
@@ -276,6 +276,7 @@ def main(world_folder):
else:
try:
i = 0.0
+ start = time.time()
for chunk in world.iter_chunks():
if i % 50 == 0:
sys.stdout.write("Rendering image")
@@ -288,7 +289,8 @@ def main(world_folder):
chunkmap = get_map(chunk)
x, z = chunk.get_coords()
map.paste(chunkmap, (16 * (x - bb.minx), 16 * (z - bb.minz)))
- print(" done\n")
+ end = time.time()
+ print(" done %f\n", end - start)
filename = os.path.basename(world_folder) + ".png"
map.save(filename, "PNG")
print("Saved map as %s" % filename)

0 comments on commit c7232f3

Please sign in to comment.
Something went wrong with that request. Please try again.