How to deploy a custom common module?

Jason Friedman jsf80238 at gmail.com
Sat May 16 22:06:49 EDT 2015


> When I deploy test.py on another computer, I put (rsync) both test.py and cmn_funcs.py in the same remote directory.
>
> If I create another python project (test2.py) in new directory, that needs common functions, what should I do with cmn_funcs.py?

I put my shared code in a separate folder, named something like
/path/to/module_dir.

I then add to /etc/profile.d/something.sh:

export PYTHONPATH=$PYTHONPATH:/path/to/module_dir



More information about the Python-list mailing list