summaryrefslogtreecommitdiffstats
path: root/Mac/Demo/example0
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>2003-01-26 20:35:47 (GMT)
committerJack Jansen <jack.jansen@cwi.nl>2003-01-26 20:35:47 (GMT)
commitdf976caa341221e570dc15a44a5701ed175ad114 (patch)
treef8fa79224dbbd25641243d15476950770b09bab9 /Mac/Demo/example0
parentdb5ab80411b8da0773653badff42a4939dbe7b61 (diff)
downloadcpython-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.py6
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()