File: autosave_test.py

package info (click to toggle)
python-pyepics 3.5.9%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,308 kB
  • sloc: python: 10,303; makefile: 109; javascript: 104; sh: 54
file content (12 lines) | stat: -rw-r--r-- 287 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
from epics.utils import IOENCODING
import epics.autosave
import time
epics.autosave.save_pvs('AutoSaveTest.req', 'tmp.sav')

time.sleep(0.5)
f = open('tmp.sav','r', encoding=IOENCODING)

data  = f.read()

if len(data) > 50:
    print("AutoSave worked... data written to file 'tmp.sav'")