Re: [Tutor] How to use subprocess module to get current logged in user?

2017-08-26 Thread boB Stepp
Thanks Alan (and Mats)! It appears there are many ways to skin this cat! On Sat, Aug 26, 2017 at 2:21 AM, Alan Gauld via Tutor wrote: > >> My objective: Determine who the currently logged in user is and >> determine if that user is in my list of users that I have authorized >> to use my program

[Tutor] Best way to get root project directory in module search path

2017-08-26 Thread boB Stepp
SunOS 5.10, Python 2.4/2.6. Again, please forgive any typos as I am having to manually enter everything. I must confess that even though I've asked about similar topics in the past, I still don't think I'm fully "getting it". I have a project structure where I am developing various programs, som

Re: [Tutor] Does matplotlib.finance still work?

2017-08-26 Thread C W
Thanks Alan. You are right, the finance.py is there. I think quotes_historical_yahoo is from 3 years ago. It is replaced by quotes_historical_yahoo_ochl and quotes_historical_yahoo_ohlc. But the problem is, yahoo finance has also changed its API (2 years ago?). It is a complete overhaul. quotes_

Re: [Tutor] How to use subprocess module to get current logged in user?

2017-08-26 Thread Alan Gauld via Tutor
> My objective: Determine who the currently logged in user is and > determine if that user is in my list of users that I have authorized > to use my programs. In addition to Steve and Mats answers: import os os.getlogin() #-> 'alan' os.getuid() #-> 1001 import pwd pwd.getpwuid(os.getuid()) #