[Tutor] accessing another system's environment
ALAN GAULD
alan.gauld at btinternet.com
Sat Feb 26 10:19:36 CET 2011
Bill,
That's the same thing we are talking about.
The problem is those environment variables are
highly variable so you can't talk about a machine's environment.
Two users on the same machine (at the same time) may have
very different environments. And a batch file or program can
add or remove variables too. So when I run python2 I may have
the PYTHONPATH seet to one thing, but if I run python3 I
have it set to something different. And I could be running
both at the same time. And another user (or service) logged
into the same machine might be running a Django web server with
yet another setting. So what is PYTHONPATH for that "machine"?
The USER and HOME Values are set by the OS to different
values depending on who is logged in, but the user can
then change these later, etc...
Even with no users logged in you might have different services
running each with their own environment set up.
It is very difficult for an admin to do anything reliably
based on environment variable settings.
Alan Gauld
Author of the Learn To Program website
http://www.alan-g.me.uk/
>
>From: Bill Allen <wallenpb at gmail.com>
>To: Alan Gauld <alan.gauld at btinternet.com>
>Cc: tutor at python.org
>Sent: Saturday, 26 February, 2011 2:50:39
>Subject: Re: [Tutor] accessing another system's environment
>
>I apologize for not have been clear previously. What I am trying to access are
>the Windows system environment variables. The same ones that are listed out if
>you type the set command at a command prompt in Windows.
>
>
>
>--Bill
>
>
>
>
>
>
>On Fri, Feb 25, 2011 at 03:11, Alan Gauld <alan.gauld at btinternet.com> wrote:
>
>
>>"Bill Allen" <wallenpb at gmail.com> wrote
>>
>>
>>I have times when it is useful for me to check the environment of a user
>>>system on our lan remotely while trouble shooting and issue with them. Now,
>>>this is quite easy to do while I am using a windows system via the computer
>>>management console.
>>>
>
I think we are meaning different things by "environment"?
>>Can you give a specific example?
>>
>>
>>
>>However, I am trying to do this via a linux workstation
>>>(which is joined to the domain, etc.). I cannot find a native
>>>facility to duplicate the computer management functions, so I thought I
>>>would write a program to fill the need.
>>>
>
Anything you can do locally you can do on the remote
>>machine with a combination of ssh, rsh, rlogin, telnet etc.
>>ssh is the safest but requires a bit more admin to set it
>>up properly for maximum convenience.
>>
>>Having got remote access its just a case of figuring out
>>which of the 500 or so Unix commands you need to
>>use to do the job... :-)
>>
>>
>>HTH,
>>
>>--
>>Alan Gauld
>>Author of the Learn to Program web site
>>http://www.alan-g.me.uk/
>>
>>
>>_______________________________________________
>>Tutor maillist - Tutor at python.org
>>To unsubscribe or change subscription options:
>>http://mail.python.org/mailman/listinfo/tutor
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20110226/05b328a8/attachment-0001.html>
More information about the Tutor
mailing list