Use python file/function across multiple local projects
Question: I have multiple python projects and each of them has a utility file, all of
them with the same functions.

How can I set up some sort of local python library which I can import to all
my local projects? I know rodeo has some functionality that you can use to
designate some functions/files to be available across multiple python
projects. Is there a way to do that outside of rodeo?

I do not want to create a library that is available through pip (since that
would mean exposing it to everyone)


Answer: You can create a local python library by creating a python package. It is as
easy as putting a file named: `__init__.py`, into your utils lib.

You can read here more about the concept of [creating a python
packages](http://stackoverflow.com/questions/13215386/creating-python-
packages)

And here [about how to write a good
`__init__.py`](http://stackoverflow.com/questions/1944569/how-do-i-write-good-
correct-package-init-py-files)

To finish, I just need to mention the PYTHONPATH, and an almost similar
question [about importint from a parent
direcory](http://stackoverflow.com/questions/8951255/import-script-from-a-
parent-directory)

Hope it was helpful for you.

