mirror of
https://github.com/python/cpython.git
synced 2025-08-03 08:34:29 +00:00
Import EasyDialogs only when needed, so this works if there is no window
manager (if it isn't needed).
This commit is contained in:
parent
f5e23ff3c6
commit
7327918631
1 changed files with 1 additions and 1 deletions
|
@ -2,7 +2,6 @@
|
|||
"""Recursively zap all .pyc and .pyo files"""
|
||||
import os
|
||||
import sys
|
||||
import EasyDialogs
|
||||
|
||||
# set doit true to actually delete files
|
||||
# set doit false to just print what would be deleted
|
||||
|
@ -11,6 +10,7 @@ doit = 1
|
|||
def main():
|
||||
if not sys.argv[1:]:
|
||||
if os.name == 'mac':
|
||||
import EasyDialogs
|
||||
dir = EasyDialogs.AskFolder(message='Directory to zap pyc files in')
|
||||
if not dir:
|
||||
sys.exit(0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue