KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I want to create a "library" of Python modules which I will be able to access from several separate project folders. For example, I want the Python scripts in /proj1/ and /proj2/ to have access to /lib/. /lib/help.py /lib/more_help.py /proj1/script.py /proj1/script2.py /proj2/this_script.py /proj2/another_script.py I don't want a single directory with all the Python scripts, as this seems rather disorganized. I also definitely don't want to copy the same /lib/ script into each of the different projects. What is the ideal way to handle this in Python? Is it appending to Python's path ? Or is this more of a hack? This seems to have the disadvantage of making the files less portable. Or is it this question/answer about using relative paths? Or something else? I should add that I'm interested in Python 2.x rather than 3.x, if it matters.
Tags (comma-separated)
Save Edits
Cancel