blob: 6a224e7c0a4894c8bf0b92dea829666be7253132 [file] [log] [blame]
Guido van Rossumc6360141990-10-13 19:23:40 +00001# Module 'filewin'
2# File windows, a subclass of textwin (which is a subclass of gwin)
3
Guido van Rossumc6360141990-10-13 19:23:40 +00004import textwin
Guido van Rossum261cbb21991-02-19 13:02:13 +00005from util import readfile
Guido van Rossumc6360141990-10-13 19:23:40 +00006
7
8# FILE WINDOW
9
10def open_readonly(fn): # Open a file window
11 w = textwin.open_readonly(fn, readfile(fn))
12 w.fn = fn
13 return w
14
15def open(fn): # Open a file window
16 w = textwin.open(fn, readfile(fn))
17 w.fn = fn
18 return w