0
0
mirror of https://github.com/python/cpython.git synced 2024-11-24 08:52:25 +01:00
cpython/Lib/lib-stdwin/filewin.py
1994-08-01 11:34:53 +00:00

21 lines
400 B
Python

# 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