Re: [Tutor] Set LD_LIBRARY_PATH and equivalents platform-independently

2013-01-19 Thread eryksun
On Sat, Jan 19, 2013 at 7:24 AM, Albert-Jan Roskam wrote: > > But is Windows the only exception in the way that libraries are dealt with? > Or do DLLs also have a dynamic area? DLLs can have an embedded manifest. To solve the DLL Hell problem, Windows introduced side-by-side assemblies (WinSxS):

Re: [Tutor] Set LD_LIBRARY_PATH and equivalents platform-independently

2013-01-19 Thread eryksun
On Fri, Jan 18, 2013 at 4:07 PM, Albert-Jan Roskam wrote: > > Alan said: >> Support for changing environment variables on the fly is iffy in most >> languages and is not something I'd ever do lightly. > > If you put it that way... yes, I now realize that it could be (and in fact > is) really annoy

Re: [Tutor] Set LD_LIBRARY_PATH and equivalents platform-independently

2013-01-19 Thread Alan Gauld
On 19/01/13 12:24, Albert-Jan Roskam wrote: Thank you! I am getting a whole lot wiser wrt Linux. I checked 'man ld' and 'man ldconfig'. Especially the ld command is pretty extensive. The Rpath/Runpath solution seems nice in that no wrapper is needed (contrary to when one uses LD_LIBRARY_PATH).

Re: [Tutor] Set LD_LIBRARY_PATH and equivalents platform-independently

2013-01-19 Thread Albert-Jan Roskam
> On Thu, Jan 17, 2013 at 10:33 AM, Albert-Jan Roskam > wrote: >> >> The goal is to load the C libraries (dll, so, dylib, etc) that my program >> needs. >> >> Anyway, I looked up your two suggestions about library_dirs and >> runtime_library_dirs. What is meant by "at link time"? > > lib

Re: [Tutor] Set LD_LIBRARY_PATH and equivalents platform-independently

2013-01-18 Thread Albert-Jan Roskam
>> Thanks for your replies. os.putenv() may be easier than os.environ because, >> hopefully, it takes care of the OS-specific separators of the values >> (";" for Windows, ":" for Linux, others I don't > know > > I wouldn't count on it. Support for changing environment variables on the > fl

Re: [Tutor] Set LD_LIBRARY_PATH and equivalents platform-independently

2013-01-17 Thread eryksun
On Thu, Jan 17, 2013 at 10:33 AM, Albert-Jan Roskam wrote: > > The goal is to load the C libraries (dll, so, dylib, etc) that my program > needs. > > Anyway, I looked up your two suggestions about library_dirs and > runtime_library_dirs. What is meant by "at link time"? library_dirs adds search p

Re: [Tutor] Set LD_LIBRARY_PATH and equivalents platform-independently

2013-01-17 Thread Alan Gauld
On 17/01/13 12:14, Albert-Jan Roskam wrote: Thanks for your replies. os.putenv() may be easier than os.environ because, > hopefully, it takes care of the OS-specific separators of the values > (";" for Windows, ":" for Linux, others I don't know I wouldn't count on it. Support for changing env

Re: [Tutor] Set LD_LIBRARY_PATH and equivalents platform-independently

2013-01-17 Thread Albert-Jan Roskam
Original Message - > From: eryksun > To: Albert-Jan Roskam > Cc: Python Mailing List > Sent: Thursday, January 17, 2013 3:21 PM > Subject: Re: [Tutor] Set LD_LIBRARY_PATH and equivalents > platform-independently > > On Wed, Jan 16, 2013 at 4:06 PM, Alb

Re: [Tutor] Set LD_LIBRARY_PATH and equivalents platform-independently

2013-01-17 Thread eryksun
On Thu, Jan 17, 2013 at 7:14 AM, Albert-Jan Roskam wrote: > > Thanks for your replies. os.putenv() may be easier than os.environ because, > hopefully, it takes care of the OS-specific separators of the values (";" > for Windows, ":" for Linux, others I don't know but I'd guess they're all > ":").

Re: [Tutor] Set LD_LIBRARY_PATH and equivalents platform-independently

2013-01-17 Thread eryksun
On Wed, Jan 16, 2013 at 4:06 PM, Albert-Jan Roskam wrote: > > Is there a builtin function that can set LD_LIBRARY_PATH or equivalents > platform-independently? It would be nice use such a function in a setup > script. Modifying LD_LIBRARY_PATH only affects child processes (ld.so caches the search

Re: [Tutor] Set LD_LIBRARY_PATH and equivalents platform-independently

2013-01-17 Thread Albert-Jan Roskam
> Subject: Re: [Tutor] Set LD_LIBRARY_PATH and equivalents > platform-independently > > On 01/16/2013 07:05 PM, Alan Gauld wrote: >> On 16/01/13 21:06, Albert-Jan Roskam wrote: >> >>> Is there a builtin function that can set LD_LIBRARY_PATH or equiva

Re: [Tutor] Set LD_LIBRARY_PATH and equivalents platform-independently

2013-01-17 Thread Alan Gauld
On 17/01/13 02:10, Dave Angel wrote: I don't recall enough about Windows to be sure whether putenv would work, but the environment variable Windows uses to search for DLL's is certainly not LD_LIBRARY_PATH If you check the code Albert is actually using different variables per platform. For Wi

Re: [Tutor] Set LD_LIBRARY_PATH and equivalents platform-independently

2013-01-16 Thread Dave Angel
On 01/16/2013 07:05 PM, Alan Gauld wrote: On 16/01/13 21:06, Albert-Jan Roskam wrote: Is there a builtin function that can set LD_LIBRARY_PATH or equivalents platform-independently? No. But there is putenv() in the os module. But how well it works across OS I'm not sure. I don't recall eno

Re: [Tutor] Set LD_LIBRARY_PATH and equivalents platform-independently

2013-01-16 Thread Alan Gauld
On 16/01/13 21:06, Albert-Jan Roskam wrote: Is there a builtin function that can set LD_LIBRARY_PATH or equivalents platform-independently? No. But there is putenv() in the os module. But how well it works across OS I'm not sure. HTH -- Alan G Author of the Learn to Program web site http://ww

[Tutor] Set LD_LIBRARY_PATH and equivalents platform-independently

2013-01-16 Thread Albert-Jan Roskam
Hello, Is there a builtin function that can set LD_LIBRARY_PATH or equivalents platform-independently? It would be nice use such a function in a setup script. The code below illustrates what I mean, although it's entirely untested. import sys import os def setPath(loc):     """Set LD_LIBRARY_PA