Re: Interactive os.environ vs. os.environ in script
- From: Thinker <thinker@xxxxxxxxx>
- Date: Tue, 27 Feb 2007 00:44:55 +0800
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
boris.smirnov@xxxxxxxxx wrote:
ld-elf.so reads environment variables when it was loaded.
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.pyTraceback (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
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-----
.
- Follow-Ups:
- Re: Interactive os.environ vs. os.environ in script
- From: boris . smirnov
- Re: Interactive os.environ vs. os.environ in script
- References:
- Interactive os.environ vs. os.environ in script
- From: boris . smirnov
- Re: Interactive os.environ vs. os.environ in script
- From: Peter Otten
- Re: Interactive os.environ vs. os.environ in script
- From: boris . smirnov
- Interactive os.environ vs. os.environ in script
- Prev by Date: Re: How to delete PyGTK ComboBox entries?
- Next by Date: Re: SystemError: new style getargs format but argument is not a tuple
- Previous by thread: Re: Interactive os.environ vs. os.environ in script
- Next by thread: Re: Interactive os.environ vs. os.environ in script
- Index(es):
Relevant Pages
|
|