A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2006-September/068848.html below:

[Python-Dev] New relative import issue

[Python-Dev] New relative import issue [Python-Dev] New relative import issueOleg Broytmann phd at phd.pp.ru
Tue Sep 19 11:47:38 CEST 2006
On Tue, Sep 19, 2006 at 03:46:59PM +1200, Greg Ewing wrote:
> There really shouldn't be
> any such thing as sys.path -- the view that any
> given module has of the package namespace should
> depend only on where it is

   I do not understand this. Can you show an example? Imagine I have two
servers, Linux and FreeBSD, and on Linux python is in /usr/bin, home is
/home/phd, on BSD these are /usr/local/bin and /usr/home/phd. I have some
modules in site-packages and some modules in $HOME/lib/python. How can I
move programs from one server to the other without rewriting them (how can
I not to put full paths to modules)? I use PYTHONPATH manipulation - its
enough to write a shell script that starts daemons once and use it for many
years. How can I do this without sys.path?!

Oleg.
-- 
     Oleg Broytmann            http://phd.pp.ru/            phd at phd.pp.ru
           Programmers don't die, they just GOSUB without RETURN.
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4