Thu, 15 Jan 2015 15:59:08 +0100
Implement a real Private Browsing Mode condition by changing the API/ABI;
This solves Tor bug #9701, complying with disk avoidance documented in
https://www.torproject.org/projects/torbrowser/design/#disk-avoidance.
1 #!/usr/bin/env python
3 # Copyright (c) 2009, Giampaolo Rodola'. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file.
7 """
8 A clone of 'who' command; print information about users who are
9 currently logged in.
10 """
12 import sys
13 from datetime import datetime
15 import psutil
16 from psutil._compat import print_
19 def main():
20 users = psutil.get_users()
21 for user in users:
22 print_("%-15s %-15s %s (%s)" % \
23 (user.name,
24 user.terminal or '-',
25 datetime.fromtimestamp(user.started).strftime("%Y-%m-%d %H:%M"),
26 user.host)
27 )
29 if __name__ == '__main__':
30 main()