File: autosave_test.py

package info (click to toggle)
python-pyepics 3.5.7%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,336 kB
  • sloc: python: 10,539; makefile: 112; javascript: 104; sh: 53
file content (12 lines) | stat: -rw-r--r-- 287 bytes parent folder | download
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'")