summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>2002-08-05 15:33:44 (GMT)
committerJack Jansen <jack.jansen@cwi.nl>2002-08-05 15:33:44 (GMT)
commita4741ffe63940709b45992f463bca8f59c259843 (patch)
tree7b9a67998ec38516a5574d09bef8e11efe8dee24
parentac7cb05415af57b3752d4e26df9201f91ff0a339 (diff)
downloadcpython-a4741ffe63940709b45992f463bca8f59c259843.zip
cpython-a4741ffe63940709b45992f463bca8f59c259843.tar.gz
cpython-a4741ffe63940709b45992f463bca8f59c259843.tar.bz2
This can now run under unix-Python too. You have to pass the folder
to search on the command line in that case.
-rw-r--r--Mac/scripts/bgenall.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/Mac/scripts/bgenall.py b/Mac/scripts/bgenall.py
index 81200fc..8fe36aa 100644
--- a/Mac/scripts/bgenall.py
+++ b/Mac/scripts/bgenall.py
@@ -19,8 +19,12 @@ def bgenone(dirname, shortname):
def main():
success = []
failure = []
- sys.path.insert(0, ':')
- srcdir = os.path.join(os.path.join(sys.prefix, 'Mac'), 'Modules')
+ sys.path.insert(0, os.curdir)
+ if len(sys.argv) > 1:
+ srcdir = sys.argv[1]
+ else:
+ srcdir = os.path.join(os.path.join(sys.prefix, 'Mac'), 'Modules')
+ srcdir = os.path.abspath(srcdir)
contents = os.listdir(srcdir)
for name in contents:
moduledir = os.path.join(srcdir, name)