mirror of
https://github.com/python/cpython.git
synced 2025-09-12 19:57:40 +00:00
Replace first sys.path entry with the directory where the script lives
(Just).
This commit is contained in:
parent
93c88cca06
commit
201f46de2c
1 changed files with 5 additions and 1 deletions
|
@ -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
|
||||
#
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue