Staging
v0.5.1
Revision c94d53db0e54d919ed3d37b85bd8d6e7f5a64a9e authored by cvs2svn on 11 October 1994, 15:44:53 UTC, committed by cvs2svn on 11 October 1994, 15:44:53 UTC
1 parent 7647b82
Raw File
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