Jean,

Thanks. Does the time.asctime() write the wall/clock time?
I am/was looking for a snippet which would (say) look at my directory, see that 
pic_0000, pic_0001, pic_0002 (for example) exist and then tell me that I need 
to resume from timestamp 0003 ... or alternatively, just write out some index 
to a temp file and then read it back and use that to resume from. My main 
script isn't working yet to generate the images I want, so I've not tried to 
implement the read back resume position. I'm expecting to generate 5000 frames 
and it may take quite a long time.

JB

From: Favre Jean
Sent: 26 July 2013 10:05
To: Biddiscombe, John A.; [email protected]
Subject: RE: resume python script from last position


you may use for example time, and replacing space with underscore.

import time
view.WriteImage(format("pic_" + time.asctime().replace(" ", "_") + ".png"), 
"vtkPNGWriter", 1)
-----------------
Jean/CSCS
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the ParaView Wiki at: 
http://paraview.org/Wiki/ParaView

Follow this link to subscribe/unsubscribe:
http://www.paraview.org/mailman/listinfo/paraview

Reply via email to