diff options
author | Jack Jansen <jack.jansen@cwi.nl> | 1998-08-18 12:21:48 (GMT) |
---|---|---|
committer | Jack Jansen <jack.jansen@cwi.nl> | 1998-08-18 12:21:48 (GMT) |
commit | 201f46de2c0ce193209ba24d68ce4ae711cac571 (patch) | |
tree | 1faf900d7247936c46dfee8ac8868cc99fb46f86 | |
parent | 93c88cca06dd0ce57c9c7c4bc76cb018cc5903ad (diff) | |
download | cpython-201f46de2c0ce193209ba24d68ce4ae711cac571.zip cpython-201f46de2c0ce193209ba24d68ce4ae711cac571.tar.gz cpython-201f46de2c0ce193209ba24d68ce4ae711cac571.tar.bz2 |
Replace first sys.path entry with the directory where the script lives
(Just).
-rw-r--r-- | Mac/Tools/macfreeze/macmodulefinder.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Mac/Tools/macfreeze/macmodulefinder.py b/Mac/Tools/macfreeze/macmodulefinder.py index d87ca9b..fd3ac74 100644 --- a/Mac/Tools/macfreeze/macmodulefinder.py +++ b/Mac/Tools/macfreeze/macmodulefinder.py @@ -62,7 +62,11 @@ def process(program, modules=[], module_files = [], debug=0): module_files.append(m) else: modules.append(m) - path = extra_path + sys.path[:] + # collect all modules of the program + path = sys.path[:] + dir = os.path.dirname(program) + path[0] = dir # "current dir" + path = extra_path + path # # Create the module finder and let it do its work # |