Is read_file() always called after an activity __init__?

Gary C Martin gary at garycmartin.com
Wed Feb 27 21:30:50 EST 2008


Hope this is not too silly a question, but is the read_file() method  
always called after the Python activity __init__'? I'm just started  
using self.metadata to store some basic preferences to pickup after a  
Journal resume, but I'm finding read_file() is never called in my  
activity. My write_file() method is correctly called as the activity  
is closed. I'm wondering if read_file() is only ever triggered during  
a resume if you have a real chunk of filesystem to write/read (my  
activity needs/has no file)?

FYI: If I pop a self.read_file('foo.bar') in my activities main  
__init__ all works as I'd expect. Should I just be picking up metadata  
values in my __init__? All documentation I've seen so far says to  
check your metadata in read_file.

Thanks for any help.




More information about the Devel mailing list