Код: Выделить всё
user@astra:~$ python
Python 2.7.13 (default, Sep 26 2018, 18:42:22)
[GCC 6.3.0 20170516] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>
>>> import os
>>>
>>> os.environ['DEBEMAIL']
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.7/UserDict.py", line 40, in __getitem__
raise KeyError(key)
KeyError: 'DEBEMAIL'
>>>
>>>
>>> exit()
user@astra:~$
Shell
user@astra:~$ cat .bashrc | grep DEBEMAIL
DEBEMAIL=user@localhost
user@astra:~$
user@astra:~$ cat .profile | grep DEBEMAIL
DEBEMAIL=user@localhost
user@astra:~$
user@astra:~$ cat .bash_profile | grep DEBEMAIL
DEBEMAIL=user@localhost
user@astra:~$
user@astra:~$ echo $DEBEMAIL
user@localhost
user@astra:~$