Distributing Packages / os independent installation folder

Uwe Schmitt uwe at rocksport.de
Fri Jun 7 05:35:07 EDT 2002


Achim Domma <achim.domma at syynx.de> wrote:
| Hi,

| - where should my package and shared librarie go to? On windows I put the
| dll into python22/DLLs and the rest into a folder
| python22/Lib/site-packages/ImageMagick. What to do on other plattforms? I
| don't expect a DLLs folder on Linux. ;-)

import sys
echo sys.path

... this might help you.

| - In my __init__.py I have to change one environment variable. Currently I
| do it like this:

| import os
| os.environ['MAGICK_HOME'] = r'C:\Python22\Lib\site-packages\ImageMagick'
| from _ImageMagick import *

| Is there an plattform independent way to get the installation folder of my
| package? On windows I can get the python folder from registry, but this will
| also break on linux.

maybe  os.getcwd()  in __init__.py does the job...

Greetings, Uwe


-- 
Dr. rer. nat. Uwe Schmitt      ICQ# 159647634   Uwe.Schmitt at num.uni-sb.de



More information about the Python-list mailing list