summaryrefslogtreecommitdiff
path: root/Mac/scripts/zappycfiles.py
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2008-07-01 18:23:09 +0000
committerBenjamin Peterson <benjamin@python.org>2008-07-01 18:23:09 +0000
commitde9c869fb8c1f842bc3dfc4d51f287cb6b644ab2 (patch)
treeda0b9c0e9d56288354f936b59021d94018a172a8 /Mac/scripts/zappycfiles.py
parentbbfd71d7ac02bc2053a0ba494a3f055fbec8deee (diff)
downloadcpython-git-de9c869fb8c1f842bc3dfc4d51f287cb6b644ab2.tar.gz
Hopefully fix make framework install on Mac (see 3174)
Removal of the Mac modules broke many of the Mac scripts (including BuildApplet.py) so the building of the Python launcher and IDLE.app was broken. I manually copied built versions of those apps into Mac. Everything else which used Mac modules had to die.
Diffstat (limited to 'Mac/scripts/zappycfiles.py')
-rw-r--r--Mac/scripts/zappycfiles.py36
1 files changed, 0 insertions, 36 deletions
diff --git a/Mac/scripts/zappycfiles.py b/Mac/scripts/zappycfiles.py
deleted file mode 100644
index b377e0d9a8..0000000000
--- a/Mac/scripts/zappycfiles.py
+++ /dev/null
@@ -1,36 +0,0 @@
-#!/usr/local/bin/python
-"""Recursively zap all .pyc and .pyo files"""
-import os
-import sys
-
-# set doit true to actually delete files
-# set doit false to just print what would be deleted
-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)
- zappyc(dir)
- else:
- print('Usage: zappyc dir ...')
- sys.exit(1)
- for dir in sys.argv[1:]:
- zappyc(dir)
-
-def zappyc(dir):
- os.walk(dir, walker, None)
-
-def walker(dummy, top, names):
- for name in names:
- if name[-4:] in ('.pyc', '.pyo'):
- path = os.path.join(top, name)
- print('Zapping', path)
- if doit:
- os.unlink(path)
-
-if __name__ == '__main__':
- main()