bluesky / suitcase-specfile

write text file such as output by SPEC
Other
0 stars 8 forks source link

ENH: flush after each event and on stop #6

Closed tacaswell closed 5 years ago

tacaswell commented 5 years ago

This makes sure that other programs (like pymca) will see updates as the come in.

danielballan commented 5 years ago

@gwbischof Note that in order to test this at CHX you will need to add flush=True to their Serializer instantiation.

tacaswell commented 5 years ago

Thanks for the commits @danielballan !

danielballan commented 5 years ago

Rebased to pick up #9 for compatibility with the new suitcase-utils.

danielballan commented 5 years ago

I added a test to verify that this closes #7. Without the fix in 838887d, the test raises:

suitcase.utils.SuitcaseUtilsValueError: The postfix 'my_file.spec' has already been used.

as we have seen in the wild. With the fix, it passes.

jklynch commented 5 years ago

Good use of tell(). Not a method I see very often.