XmlMonitor : Monitor the FLDIGI XML config file for changes in real-time

class pyfldigi.xmlconfig.XmlMonitor(config_dir, start=True)[source]

Bases: object

A useful tool for figuring out which XML parameter is correlated with a particular setting in the FLDIGI GUI. It will monitor for changes to the config file, and print any changes to the console as they happen. Make sure to press ‘save settings’ after making your setting! The actual monitoring happens in a thread, so it is non-blocking.

Parameters:
  • config_dir (str (path to folder)) – The directory in which fldigi reads and writes its config files. e.g. ‘C:/Users/njansen/fldigi.files/’
  • start (bool) – If True, the monitoring will start immediately. if False, start() must be called.

Note

All changed settings are logged by default using the Python logger framework, to the configuration directory, as ‘XmlMonitor.log’

Note

Press Ctrl-C to stop, or set a timeout before running.

Example:
>>> import pyfldigi
>>> xc = pyfldigi.XmlMonitor(config_dir)
2017-02-05 16:36:29,129 : XmlMonitor : Monitoring C:/Users/jeff/fldigi.files/fldigi_def.xml...
2017-02-05 16:36:47,252 : XmlMonitor : MYANTENNA changed from 'dipole' to 'yagi'
2017-02-05 16:36:51,279 : XmlMonitor : MYANTENNA changed from 'yagi' to 'magloop'
start()[source]

Start monitoring the XML. This launches a monitoring thread, therefore start() is non-blocking.

stop()[source]

Stop monitoring the XML. Stops the thread. Can be restarted with start().