I’m building a personal module of functions, generic functions for my scientific work.
It’s not finished so I would like to keep it in it’s development folder for the time being without installing it like you install every other modules with pip, etc.
Now, I also need to work on other non-related projects but still need the functions.
My question is, having those 2 projects in completely independent folders, how do I import one to use in the other?
thanks
EDIT: Just another quick one. If both were inside their respective folder but with the same root. Would there be a better/easier way to do this?
Put the directory containing your module (let’s call it
functions.py) into the PYTHONPATH environment variable. Then you’ll be able to useimport functionsto get your functions.Pip also seems to have support for this:
pip install -e src/mycheckoutfor exxample, but I don’t quite understand the ramifications of that.