plc_config.py and plc-config-tty: generalized to work for more diverse