We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5b2eaf3 commit 8fbc189Copy full SHA for 8fbc189
xpp/modules/ops/stdlib/import_.py
@@ -3,6 +3,7 @@
3
# Modules
4
import os
5
import json
6
+from pathlib import Path
7
from copy import copy as copyobj
8
9
from xpp import config, load_sections
@@ -12,8 +13,8 @@
12
13
14
# Initialization
15
search_locations = [
- os.path.abspath(os.path.join(os.path.dirname(__file__), "../../../../pkgs")),
16
- os.path.abspath(os.path.join(os.getcwd(), "pkgs")),
+ str(Path(__file__).parents[4] / "pkgs"), # Global pkgs folder (assuming module install)
17
+ str(Path("pkgs").absolute()) # Local pkgs folder (relative to cwd)
18
]
19
main_namespace = config.get("main", "main").split(os.sep)[-1].removesuffix(".xpp")
20
0 commit comments