Subject: Where best to put local modules?
From: tinnews@isbd.co.uk
Date: 12/19/2007 5:02:20 PM
I'm just beginning to create some python modules for my own use and
I'm wondering where to put them. Initially I have put them in
$HOME/bin and I have set PYTHONPATH to point to them there. It all
seems to be OK but I was wondering if I might be storing up problems
for the future by putting python modules in with my odds and sods of
shell scripts etc. (and with my python 'main' scripts).
Would I be better off putting the modules somewhere else, e.g.
somewhere like $HOME/lib/python?
--
Chris Green
Subject: Where best to put local modules?
From: tinnews@isbd.co.uk
Date: 12/20/2007 8:46:19 AM
Gabriel Genellina <gagsl-py2@yahoo.com.ar> wrote:
> En Wed, 19 Dec 2007 14:02:20 -0300, <tinnews@isbd.co.uk> escribi?:
>
> > I'm just beginning to create some python modules for my own use and
> > I'm wondering where to put them. Initially I have put them in
> > $HOME/bin and I have set PYTHONPATH to point to them there. It all
> > seems to be OK but I was wondering if I might be storing up problems
> > for the future by putting python modules in with my odds and sods of
> > shell scripts etc. (and with my python 'main' scripts).
> >
> > Would I be better off putting the modules somewhere else, e.g.
> > somewhere like $HOME/lib/python?
>
> Try lib/pythonX.X/site-packages, which is already on sys.path so you don't
> have to set PYTHONPATH
>
That's fine if it happens to be your own system and you have root
access, however I was actually meaning on a system where I just have a
shell account.
--
Chris Green
|