Print preview of text using python.
Python Code:
from tkinter import *
root = Tk()
configfile = Text(root, wrap=WORD, width=45, height= 20)
configfile.pack(fill="none", expand=TRUE)
filename='N.txt'
with open(filename,"rt", encoding="utf-8") as f:
configfile.insert(INSERT, f.read())