]> granicus.if.org Git - python/commitdiff
Replace first sys.path entry with the directory where the script lives
authorJack Jansen <jack.jansen@cwi.nl>
Tue, 18 Aug 1998 12:21:48 +0000 (12:21 +0000)
committerJack Jansen <jack.jansen@cwi.nl>
Tue, 18 Aug 1998 12:21:48 +0000 (12:21 +0000)
(Just).

Mac/Tools/macfreeze/macmodulefinder.py

index d87ca9bc983c88681a304f3fbe3d84f62b05025c..fd3ac749b374b5b20c03479154fad75e13d494da 100644 (file)
@@ -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
        #