Re: Interactive os.environ vs. os.environ in script



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

boris.smirnov@xxxxxxxxx wrote:

OK then I have to reformulate my question. :)

In my script I have a line with

os.environ["LD_LIBRARY_PATH"]='/path/Linux/rh_linux'

but this line didn't work. But when I set this environment variable
in Linux shell it works. Here is a small example.

python shrink_bs_070226.py
Traceback (most recent call last): File "shrink_bs_070226.py", line
25, in ? from qt import * File
"/path/Linux/python/rh_linux/lib/python2.2/site-packages/ qt.py",
line 46, in ? import libsip ImportError: libadamsqt.so: cannot open
shared object file: No such file or directory
ld-elf.so reads environment variables when it was loaded.
It never reads environment variables again!
That you setting environment in the process does not make link-editor
to re-read environment variable and take effect.

To resolve the problem, you can try to add the path to sys.path.

- --
Thinker Li - thinker@xxxxxxxxx thinker.li@xxxxxxxxx
http://heaven.branda.to/~thinker/GinGin_CGI.py
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (FreeBSD)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFF4w6H1LDUVnWfY8gRAoI0AKCLikYsFU2N6aaOZFDd1L2KY8DjqACg3QQn
KsEEcrvpw1CktEkVCKe/ojk=
=EQG6
-----END PGP SIGNATURE-----

.



Relevant Pages

  • Re: Interactive os.environ vs. os.environ in script
    ... ld-elf.so reads environment variables when it was loaded. ... Comment: Using GnuPG with Mozilla -http://enigmail.mozdev.org ... ImportError: libadamsqt.so: cannot open shared object file: No such ...
    (comp.lang.python)
  • Re: [kde/qt] Unicode/special char problem
    ... Alvin Oga ha scritto: ... > what is the environment variables defined as: ... Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org ...
    (Debian-User)
  • Re: logon/logoff scripts...
    ... I am using the %clientname% and %machine% name environment variables to ... each user you can specify a login script but nowhere do I see the ...
    (microsoft.public.backoffice.smallbiz2000)
  • Re: Startup script ?
    ... I.E where do I put the script ... Every process has a set of environment variables, ... If there is some script that runs apt-get ... that will get set whenever *lots* of users login, ...
    (Debian-User)
  • Re: exporting a variable to global shells
    ... Environment variables are a user-space concept - ... When the script is exiting the echo stdout's the proxy adress, ... setting up my network differently depending on where/what I connect to. ... With regard to actually *setting* the proxy server, ...
    (Debian-User)