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


Groups > comp.lang.python > #11916 > unrolled thread

Re: Python import search path

Started byChris Angelico <rosuav@gmail.com>
First post2011-08-20 13:25 +0100
Last post2011-08-20 13:25 +0100
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Python import search path Chris Angelico <rosuav@gmail.com> - 2011-08-20 13:25 +0100

#11916 — Re: Python import search path

FromChris Angelico <rosuav@gmail.com>
Date2011-08-20 13:25 +0100
SubjectRe: Python import search path
Message-ID<mailman.262.1313843142.27778.python-list@python.org>
On Sat, Aug 20, 2011 at 10:52 AM, Kevin Zhang <kevin.misc.10@gmail.com> wrote:
> Found a few solution in python docs.
> A. sys.path.append

> I think A is not so pretty, and I don't have root  privilege to use B and C.
> So any both more elegant and practical solutions?

If, as I understand from your directory tree, ttt.py is a tester for
sss.py, then I'd say this is the right option. It's only going to be
used in the special environment of testing, so it's okay to have a
single line of code up the top that makes it convenient.

Chris Angelico

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web