Kaydet (Commit) 73279186 authored tarafından Jack Jansen's avatar Jack Jansen

Import EasyDialogs only when needed, so this works if there is no window

manager (if it isn't needed).
üst f5e23ff3
...@@ -2,7 +2,6 @@ ...@@ -2,7 +2,6 @@
"""Recursively zap all .pyc and .pyo files""" """Recursively zap all .pyc and .pyo files"""
import os import os
import sys import sys
import EasyDialogs
# set doit true to actually delete files # set doit true to actually delete files
# set doit false to just print what would be deleted # set doit false to just print what would be deleted
...@@ -11,6 +10,7 @@ doit = 1 ...@@ -11,6 +10,7 @@ doit = 1
def main(): def main():
if not sys.argv[1:]: if not sys.argv[1:]:
if os.name == 'mac': if os.name == 'mac':
import EasyDialogs
dir = EasyDialogs.AskFolder(message='Directory to zap pyc files in') dir = EasyDialogs.AskFolder(message='Directory to zap pyc files in')
if not dir: if not dir:
sys.exit(0) sys.exit(0)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment