I am working on a program (in Python) which should display, every time a user connects to the system, a list of all logged users and the number of their active processes. Now I'd know (more or less) how to write this program in Shell, using such commands as "who" and "ps -u", but are there similar methods I could use in Python? And where should I actually look to inquire when a new user logs in? (I aren't allowed to access /var/log/wtmp)
Thanks a lot,
Adnana