Re: [Distutils] Re: [Python-Dev] Where to install non-code files
Greg Ward wrote: [snip]
I have yet to hear howls of my revulsion at my loopy idea of sticking this: import sys; sys.path.insert(0, application-python-path)
into scripts that are installed as part of a "Python application" (ie. a module distribution whose main interface is a script or scripts, and that gets its own directory rather than dangling off Python's library directory). Could it be that people actually think this is a *good* idea? ;-) [snip]
Problem is, the alternatives are equally bad. Ok, playing Devil's advocate: one issue is that if the user (or sysadmin) chooses to move the application directory tree, everything will stop working. Since this also causes problems for uninstall (and probably many other things), the best solution for this problem is *don't do this*. One thing to consider is that the python interpreter automatically prepends the path of the script into sys.path. Therefore, if you install your scripts into the root of your application install directory, you don't need do do any path-mangling. ============================================================================= michaelMuller = mmuller@enduden.com | http://www.cloud9.net/~proteus ----------------------------------------------------------------------------- In this book it is spoken of the Sephiroth, and the Paths, of Spirits and Conjurations; of Gods, Spheres, Planes and many other things which may or may not exist. It is immaterial whether they exist or not. By doing certain things certain results follow. - Aleister Crowley =============================================================================
participants (1)
-
Michael Muller