Files
JIMRI/jython/SampleWriteRosterAttribute.py
T
2026-06-17 14:00:51 +02:00

15 lines
270 B
Python

#
# Write an attribute to the Roster
import jmri
# get a specific entry by name
entry = jmri.jmrit.roster.Roster.getDefault().entryFromTitle("000test attribute")
# add an attribute
entry.putAttribute("newKey", "newValue")
# and rewrite the file
entry.updateFile();