home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
linuxmafia.com 2016
/
linuxmafia.com.tar
/
linuxmafia.com
/
pub
/
palmos
/
pippy-0.6beta-src.tar.gz
/
pippy-0.6beta-src.tar
/
pippy-0.6beta-src
/
src
/
Lib
/
lib-stdwin
/
filewin.py
< prev
next >
Wrap
Text File
|
2000-12-21
|
400b
|
21 lines
# 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