here is a code that I wanna change LD\_LIBRARY\_PATH to exec a code:

```
#!/usr/bin/python
import os

code='''
import os
print os.getenv("LD_LIBRARY_PATH");
import wrap
'''

os.environ['LD_LIBRARY_PATH'] = '/home/dma/python'
os.environ["PYTHONPATH"] = '/home/dma/python'

exec code

```

The output is:

```
/home/dma/python
Traceback (most recent call last):
  File "./test.py", line 13, in ?
    exec code
  File "<string>", line 4, in ?
ImportError: example.so: cannot open shared object file: No such file or directory

```

NOTE: test.py depend on wrap.so, wrap.so depend on example.so

Is there any way to execute the code object in the special environment?

Thanks
Dma