Le jeudi 19 février 2009 à 09:47 +0100, Karsten Hilbert a écrit : > > This is very simple, just ship the modules to /usr/share/gnumed-client, > > and modify your script to do something like: > > import sys > > sys.path.append("/usr/share/gnumed-client") > > import Gnumed.whatyouwant > > What GNUmed currently does is: > > import Gnumed.whatyouwant > > and expect to *just find* its modules in sys.path - which is > AFAICT the right thing to do and works cross platform. This > runs on all flavours of Linux plus Windows plus MacOSX so > I'm not going to hardcode *something else* right into my > Python scripts which is specific to Linux or even Debian.
There is nothing specific in using a private modules directory. Actually, if the modules are not useful to anything else outside Gnumed, there’s no reason to put them in a public path, where they can be accessed by any other Python application. > No, if something is hardcoded or dynamically adjusted it > should really be in an OS-level wrapper around gnumed.py > such as a shell script. I fail to see any difference between doing it in shell or in python. If you want to do what I wrote earlier in shell, just modify PYTHONPATH to the privates module directory, and that’s all. -- .''`. Debian 5.0 "Lenny" has been released! : :' : `. `' Last night, Darth Vader came down from planet Vulcan and told `- me that if you don't install Lenny, he'd melt your brain.
signature.asc
Description: Ceci est une partie de message numériquement signée