2 """Count shown files; display the date of oldest file
4 This file is a part of XSetBg.
8 __version__ = "$Revision$"[11:-2]
9 __revision__ = "$Id$"[5:-2]
10 __date__ = "$Date$"[7:-2]
12 __author__ = "Oleg BroytMann <phd@phd.pp.ru>"
13 __copyright__ = "Copyright (C) 2006 PhiloSoft Design"
14 __license__ = "GNU GPL"
17 from time import localtime, asctime
19 xsetbg_dir = os.path.join(os.environ["HOME"], "lib", "xsetbg")
22 global_db_name = "xsetbg.db"
27 global_db = shelve.open(global_db_name, flag='r')
28 for key in global_db.keys():
30 if key.startswith('/') and ((oldest is None) or (global_db[key] < oldest)):
31 oldest = global_db[key]
35 print "Oldest:", asctime(localtime(oldest))