mirror of
https://github.com/python/cpython.git
synced 2025-10-29 04:35:05 +00:00
Use new file dialogs.
This commit is contained in:
parent
d9db3a6713
commit
b340acf9fd
16 changed files with 72 additions and 78 deletions
|
|
@ -9,6 +9,7 @@
|
|||
#
|
||||
import os
|
||||
import macfs
|
||||
import EasyDialogs
|
||||
import sys
|
||||
import macostools
|
||||
|
||||
|
|
@ -45,10 +46,10 @@ def walktree(name, change):
|
|||
walktree(os.path.join(name, f), change)
|
||||
|
||||
def run(change):
|
||||
fss, ok = macfs.GetDirectory('Folder to search:')
|
||||
if not ok:
|
||||
pathname = EasyDialogs.AskFolder(message='Folder to search:')
|
||||
if not pathname:
|
||||
sys.exit(0)
|
||||
walktree(fss.as_pathname(), change)
|
||||
walktree(pathname, change)
|
||||
|
||||
if __name__ == '__main__':
|
||||
run(1)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue