Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #90764

Re: How to deploy a custom common module?

References <05d4eec1-1590-41ae-9315-7bb3cd2b22ee@googlegroups.com>
Date 2015-05-16 20:06 -0600
Subject Re: How to deploy a custom common module?
From Jason Friedman <jsf80238@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.88.1431828418.17265.python-list@python.org> (permalink)

Show all headers | View raw


> 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

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

How to deploy a custom common module? zljubisicmob@gmail.com - 2015-05-15 21:38 -0700
  Re: How to deploy a custom common module? Jason Friedman <jsf80238@gmail.com> - 2015-05-16 20:06 -0600
    Re: How to deploy a custom common module? Irmen de Jong <irmen.NOSPAM@xs4all.nl> - 2015-05-17 04:32 +0200

csiph-web