summaryrefslogtreecommitdiffstats
path: root/Lib/stdwin/filewin.py
blob: 6a224e7c0a4894c8bf0b92dea829666be7253132 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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