Create setlrepl.py

Initial implementation, basic functionality working ok