Staging
v0.8.1
https://github.com/python/cpython
Raw File
Tip revision: 080daa04f1636224f2b0aeb34de80482a6d2496b authored by cvs2svn on 11 April 2000, 17:11:09 UTC
This commit was manufactured by cvs2svn to create tag 'r16a2'.
Tip revision: 080daa0
filewin.py
# 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
back to top