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?

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!1.eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed3a.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <jsf80238@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.036
X-Spam-Evidence '*H*': 0.93; '*S*': 0.00; 'deploy': 0.09; 'subject:module': 0.09; 'subject:How': 0.10; 'cc:addr:python- list': 0.11; 'python': 0.11; 'folder,': 0.16; 'skip:p 40': 0.19; 'separate': 0.22; 'cc:addr:python.org': 0.22; 'directory.': 0.24; 'cc:2**0': 0.24; 'header:In-Reply-To:1': 0.27; 'message- id:@mail.gmail.com': 0.30; 'code': 0.31; 'directory,': 0.31; 'another': 0.32; 'common': 0.35; 'something': 0.35; 'received:google.com': 0.35; 'add': 0.35; 'subject:?': 0.36; 'should': 0.36; 'project': 0.37; 'remote': 0.38; 'new': 0.61; 'export': 0.74; 'subject:common': 0.84; 'to:none': 0.92
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=BVE8v4XD+r9uMC8R+N4NAHkOyN8HOK/oeNhOO9aTGSk=; b=Me539wBhPkWmBwVStOi6BjgqZEY3yID8UAWa5GfNcD8S5zm0ik93ClbYGOfJqufz9e xrd/kiLtViiQZAX9MZc9oUt0C8OyV9FifnxRpP7apApNYfnqY1sQMg1hiYSfP41fBltD r80VyG/oopna/VKNbselZUVj8Bk16H7s9jrUE8UGHQ2+GtHALTFlW6XOs7Nlb5N65MNy ocDfLjfkYFYdrxq6wbQyU0n05WugsdjliyAkqfhhO7V0MRECQ5m642FDkGY6sofizl95 cZQJslTg/ig5bWxthqznZuJ86q4hxJHMGX+5Bghln15/b+Y77pEcyXVaqs3c7IFQf4xE aRYA==
MIME-Version 1.0
X-Received by 10.194.60.43 with SMTP id e11mr32412443wjr.36.1431828409315; Sat, 16 May 2015 19:06:49 -0700 (PDT)
In-Reply-To <05d4eec1-1590-41ae-9315-7bb3cd2b22ee@googlegroups.com>
References <05d4eec1-1590-41ae-9315-7bb3cd2b22ee@googlegroups.com>
Date Sat, 16 May 2015 20:06:49 -0600
Subject Re: How to deploy a custom common module?
From Jason Friedman <jsf80238@gmail.com>
Cc python-list <python-list@python.org>
Content-Type text/plain; charset=UTF-8
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.20+
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.88.1431828418.17265.python-list@python.org> (permalink)
Lines 10
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1431828418 news.xs4all.nl 2856 [2001:888:2000:d::a6]:35271
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:90764

Show key headers only | 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