getFioAdds, fioAddsToFile

The MacroServer environment variable FioAdditions points to a file which generates meta data stored in the .fio header. The recommended file name is /online_dir/fioAdds.py. Here is an example 4.1.2.

The function getFioAdds() extracts the information and stores it in a list and a dictionary. The function fioAddsToFile() creates an extra .fio file containing the header information.

import HasyUtils
(lst, dct) = HasyUtils.getFioAdds()
print lst
print dct
try: 
    result = HasyUtils.fioAddsToFile( "/home/p99user/temp/t3.fio")
except Exception, e:
    print "caught exception", repr( e)

--- produces this output

['fioAdd_line1', 'fioAdd_line2', 'fioAdd_line3']
{'fioAdd_par2': 'value2', 'fioAdd_par3': 'value3', 'fioAdd_par1': 'value1'}