Skip to content

Commit

Permalink
normalize_path(): keep the current folder in sys.path
Browse files Browse the repository at this point in the history
The current folder marker (empty string) was removed from sys.path in normalize_path().
The current folder is now stored as a static path (absolute path) and as a dynamic marker (empty string, to follow the working directory).
  • Loading branch information
tcalmant committed Jun 23, 2016
1 parent 696aee1 commit 24a8401
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pelix/framework.py
Original file line number Diff line number Diff line change
Expand Up @@ -1606,6 +1606,12 @@ def normalize_path():
sys.path = [os.path.abspath(path) for path in sys.path
if os.path.exists(path)]

# Add the "static" current path
sys.path.insert(0, os.getcwd())

# Keep the "dynamic" current folder indicator
sys.path.insert(0, '')

# Normalize paths in loaded modules
for name, module in sys.modules.items():
try:
Expand Down

0 comments on commit 24a8401

Please sign in to comment.