[Tutor] Is there some way to tell which interpreter is in use?

Bob Gailer ramrom@earthling.net
Wed Mar 12 15:34:05 2003


--=======3C52430E=======
Content-Type: text/plain; x-avg-checked=avg-ok-4B3B7BC2; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 8bit

At 02:50 PM 3/12/2003 -0500, Greg Freemyer wrote:
>Is there some way to tell which interpreter is in use?

Do you mean "operating system"? Try:

import sys
sys.platform # returns 'win32' on my Win2K system

>  What is the win32 equivalent of getuid().

import getpass
getpass.getuser() # returns (in my case) 'Administrator

"This function checks the environment variables LOGNAME, USER, LNAME and 
USERNAME, in order, and returns the value of the first one which is set to 
a non-empty string."

HTH

Bob Gailer
mailto:ramrom@earthling.net
303 442 2625

--=======3C52430E=======
Content-Type: text/plain; charset=us-ascii; x-avg=cert; x-avg-checked=avg-ok-4B3B7BC2
Content-Disposition: inline


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.459 / Virus Database: 258 - Release Date: 2/25/2003

--=======3C52430E=======--