From a19a216bc60160c162e616145ef091dd18ce4e61 Mon Sep 17 00:00:00 2001 From: Skip Montanaro Date: Tue, 16 Feb 2021 14:40:46 -0600 Subject: Python 0.9.1 as posted in alt.sources --- lib/filewin.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 lib/filewin.py (limited to 'lib/filewin.py') diff --git a/lib/filewin.py b/lib/filewin.py new file mode 100644 index 0000000..ad35ea4 --- /dev/null +++ b/lib/filewin.py @@ -0,0 +1,18 @@ +# Module 'filewin' +# File windows, a subclass of textwin (which is a subclass of gwin) + +import textwin +from util import readfile + + +# FILE WINDOW + +def open_readonly(fn): # Open a file window + w = textwin.open_readonly(fn, readfile(fn)) + w.fn = fn + return w + +def open(fn): # Open a file window + w = textwin.open(fn, readfile(fn)) + w.fn = fn + return w -- cgit v1.2.3