]> granicus.if.org Git - python/commitdiff
Import EasyDialogs only when needed, so this works if there is no window
authorJack Jansen <jack.jansen@cwi.nl>
Mon, 16 Jun 2003 13:55:21 +0000 (13:55 +0000)
committerJack Jansen <jack.jansen@cwi.nl>
Mon, 16 Jun 2003 13:55:21 +0000 (13:55 +0000)
manager (if it isn't needed).

Mac/scripts/zappycfiles.py

index b5af2d0423189bf198ebcb381eabe106827d78a2..0349220d9e9a98687b1af9b2dd98cb2eef0351b5 100644 (file)
@@ -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)