diff options
author | Jack Jansen <jack.jansen@cwi.nl> | 2003-01-26 20:35:47 (GMT) |
---|---|---|
committer | Jack Jansen <jack.jansen@cwi.nl> | 2003-01-26 20:35:47 (GMT) |
commit | df976caa341221e570dc15a44a5701ed175ad114 (patch) | |
tree | f8fa79224dbbd25641243d15476950770b09bab9 /Mac/Demo/example0 | |
parent | db5ab80411b8da0773653badff42a4939dbe7b61 (diff) | |
download | cpython-df976caa341221e570dc15a44a5701ed175ad114.zip cpython-df976caa341221e570dc15a44a5701ed175ad114.tar.gz cpython-df976caa341221e570dc15a44a5701ed175ad114.tar.bz2 |
Use new file dialogs.
Diffstat (limited to 'Mac/Demo/example0')
-rw-r--r-- | Mac/Demo/example0/checktext.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/Mac/Demo/example0/checktext.py b/Mac/Demo/example0/checktext.py index 93a814d..a5943a6 100644 --- a/Mac/Demo/example0/checktext.py +++ b/Mac/Demo/example0/checktext.py @@ -1,15 +1,13 @@ """checktext - Check that a text file has macintosh-style newlines""" -import macfs import sys import EasyDialogs import string def main(): - fsspec, ok = macfs.PromptGetFile('File to check end-of-lines in:', 'TEXT') - if not ok: + pathname = EasyDialogs.AskFileForOpen(message='File to check end-of-lines in:') + if not pathname: sys.exit(0) - pathname = fsspec.as_pathname() fp = open(pathname, 'rb') try: data = fp.read() |