Why not run the original less via subprocesses?
import subprocess def less(text): p = subprocess.Popen(["less"], stdin=subprocess.PIPE) p.communicate(text.encode())