Set an environment variable

Mike Meyer mwm at mired.org
Wed Oct 26 22:04:58 CEST 2005


Jorgen Grahn <jgrahn-nntq at algonet.se> writes:
> On Wed, 26 Oct 2005 07:42:19 -0700, Alex Martelli <aleaxit at yahoo.com> wrote:
>> Grant Edwards <grante at visi.com> wrote:
>>> On 2005-10-24, Eric Brunel <eric_brunel at despammed.com> wrote:
>>> >> The only think you can export an environment variable to is a
>>> >> child process
>>> > Well, you know that, and I know that too. From my experience,
>>> > many people don't...
>>> True.  Using Unix for 20+ years probably warps one's perception
>>> of what's obvious and what isn't.
>> This specific issue is identical in Windows, isn't it?  I do not know
>> any OS which does have the concept of "environment variable" yet lets
>> such variables be ``exported'' to anything but a child process.
> AmigaDOS, if I recall correctly. Its "ENV:" drive/namespace is global, and
> that's its closest thing to Unix environment variables.

AmigaDOS had both global environment variables (using the ENV: device)
and local environment variables, that worked like the Unix
version. You manipulated them in a similar way in the shell, and they
had a similar API for programmers: one call with a flag to indicate
which you wanted. The ENV: device was an implementation detail that
let you save/restore the state of the global environment with file
commands. The posix calls checked the local then global variables.

Of course, this is now 10+ year old memory, and I may not RC.

   <mike
-- 
Mike Meyer <mwm at mired.org>			http://www.mired.org/home/mwm/
Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information.



More information about the Python-list mailing list