Mercurial > cpython-lru_cache-weakref
view Lib/lib-stdwin/filewin.py @ 5817:48b94de85bf3 legacy-trunk
Extensive changes by AMK.
| author | Guido van Rossum <guido@python.org> |
|---|---|
| date | Thu, 17 Jul 1997 16:29:42 +0000 |
| parents | 1940892d2fe3 |
| children |
line wrap: on
line source
# Module 'filewin' # File windows, a subclass of textwin (which is a subclass of gwin) import textwin import __builtin__ # FILE WINDOW def open_readonly(fn): # Open a file window fp = __builtin__.open(fn, 'r') w = textwin.open_readonly(fn, fp.read()) w.fn = fn return w def open(fn): # Open a file window fp = __builtin__.open(fn, 'r') w = textwin.open(fn, fp.read()) w.fn = fn return w
