[wingide-users] Environment in terminal vs Wing

Wingware Support support at wingware.com
Mon Oct 28 08:38:24 MDT 2013


Ofer wrote:
> I'm noticing differences in the environment variables in the terminal 
> vs in Wing.
> I have set the project option "Use inherited environment" and so I 
> would expect them to be the same, but they are not.
>
> For example, in Wing,
> os.environ["PYTHONPATH"]
> Traceback (most recent call last):
>   File "/home/oferb/lib/wingide5.0/src/debug/tserver/_sandbox.py", 
> line 1, in <module>
>     # Used internally for debug sandbox under external interpreter
>   File "/usr/lib/python2.7/UserDict.py", line 23, in __getitem__
>     raise KeyError(key)
> KeyError: 'PYTHONPATH'
>
> whereas in the terminal,
> $ echo $PYTHONPATH
> /opt/ros/hydro/lib/python2.7/dist-packages:/home/oferb/opt/morse/lib/python3.2/site-packages:
>
> and also via python:
> oferb at math306-pc:~$ python
> Python 2.7.3 (default, Sep 26 2013, 20:03:06)
> [GCC 4.6.3] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import os
> >>> os.environ["PYTHONPATH"]
> '/opt/ros/hydro/lib/python2.7/dist-packages:/home/oferb/opt/morse/lib/python3.2/site-packages:'
>
>
> I would like the environments in both the terminal and Wing to be the 
> same.
> Can you suggest what I should do?

How are you launching Wing?  If you start it from the teminal with 
wing5.0 it should inherit the environment there. If you start it from a 
menu or icon it'll inherit the environment set up by the launcher, which 
may be different because it probably doesn't read your 
.cshrc/.profile/etc file(s).

Please let me know if this doesn't help.

-- 

Stephan Deibel
Wingware | Python IDE
Advancing Software Development

www.wingware.com


More information about the wingide-users mailing list