I want that my pv should be read and printed continuously. I have written below python code :
from org.csstudio.opibuilder.scriptUtil import PVUtil
import os,sys
import subprocess
import glob
from os import path
from datetime import datetime
while True:
pv=PVUtil.getDouble(pvs[1])
i = datetime.now()
sys.stdout=open("test2.txt","wb")
print str(i), pv '\\n'
sys.stdout.close()
But I an getting error:
2016-09-26 15:49:33 ERROR: Failed to register .
SyntaxError: ("mismatched input 'pv' expecting INDENT", ('<script>', 8, 0, 'pv=PVUtil.getDouble(pvs[1])\n'))