[Paraview] resume python script from last position

Biddiscombe, John A. biddisco at cscs.ch
Fri Jul 26 04:47:05 EDT 2013


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.; paraview at paraview.org
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20130726/9c223e4f/attachment.htm>


More information about the ParaView mailing list