Skip to content

Unable to "require" macros from a file at a different directory by absolute path. #2618

Answered by Kodiologist
Priezt asked this question in Q&A
Discussion options

You must be logged in to vote

When using "require", I can only load macros from a file in the same directory.

You should be able to require a file from anywhere in sys.path, with the same rules as import. If not, it's a bug.

Is it possible to load from a file at a different directory by absolute path?

If it's not already in sys.path, you can temporarily add its parent directory.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Kodiologist
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #2617 on October 31, 2024 12:28.