mirror of
https://github.com/python/cpython.git
synced 2025-11-25 12:44:13 +00:00
Use new file dialogs.
This commit is contained in:
parent
db5ab80411
commit
df976caa34
3 changed files with 34 additions and 39 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue