From: Jack Jansen Date: Mon, 16 Jun 2003 13:55:21 +0000 (+0000) Subject: Import EasyDialogs only when needed, so this works if there is no window X-Git-Tag: v2.3c1~418 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7327918631eb7a67598a7d76f3bd0d3dbcdd1fd5;p=python Import EasyDialogs only when needed, so this works if there is no window manager (if it isn't needed). --- diff --git a/Mac/scripts/zappycfiles.py b/Mac/scripts/zappycfiles.py index b5af2d0423..0349220d9e 100644 --- a/Mac/scripts/zappycfiles.py +++ b/Mac/scripts/zappycfiles.py @@ -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)