[Python-checkins] python/dist/src/Mac/Demo/example0 checktext.py,1.1,1.2
jackjansen@users.sourceforge.net
jackjansen@users.sourceforge.net
Sun, 26 Jan 2003 12:35:39 -0800
Update of /cvsroot/python/python/dist/src/Mac/Demo/example0
In directory sc8-pr-cvs1:/tmp/cvs-serv31970
Modified Files:
checktext.py
Log Message:
Use new file dialogs.
Index: checktext.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/Demo/example0/checktext.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** checktext.py 18 Jul 1996 16:07:05 -0000 1.1
--- checktext.py 26 Jan 2003 20:35:37 -0000 1.2
***************
*** 1,5 ****
"""checktext - Check that a text file has macintosh-style newlines"""
- import macfs
import sys
import EasyDialogs
--- 1,4 ----
***************
*** 7,14 ****
def main():
! fsspec, ok = macfs.PromptGetFile('File to check end-of-lines in:', 'TEXT')
! if not ok:
sys.exit(0)
- pathname = fsspec.as_pathname()
fp = open(pathname, 'rb')
try:
--- 6,12 ----
def main():
! pathname = EasyDialogs.AskFileForOpen(message='File to check end-of-lines in:')
! if not pathname:
sys.exit(0)
fp = open(pathname, 'rb')
try: