home *** CD-ROM | disk | FTP | other *** search
/ PC Welt 2006 November (DVD) / PCWELT_11_2006.ISO / casper / filesystem.squashfs / usr / lib / python2.4 / site-packages / AppInstall / prof.pyo (.txt) < prev    next >
Encoding:
Python Compiled Bytecode  |  2006-08-31  |  1.2 KB  |  31 lines

  1. # Source Generated with Decompyle++
  2. # File: in.pyo (Python 2.4)
  3.  
  4. from AppInstall import *
  5. from Menu import *
  6. import hotshot
  7. import hotshot.stats as hotshot
  8. if __name__ == '__main__':
  9.     datadir = '/usr/share/gnome-app-install'
  10.     desktopdir = '/usr/share/app-install'
  11.     name = 'gai.prof'
  12.     prof = hotshot.Profile(name)
  13.     if sys.argv[1] == '-m':
  14.         cache = apt.Cache()
  15.         treeview = gtk.TreeView()
  16.         prof.runcall(ApplicationMenu, desktopdir, datadir, cache, treeview, treeview, apt.progress.OpProgress())
  17.         prof.close()
  18.     elif sys.argv[1] == '-a':
  19.         cmd = 'app = AppInstall(datadir, desktopdir, sys.argv)'
  20.         prof.runctx(cmd, globals(), locals())
  21.         prof.close()
  22.     elif sys.argv[1] == '-d':
  23.         stat = hotshot.stats.load(name)
  24.         stat.strip_dirs()
  25.         stat.sort_stats('time', 'calls')
  26.         stat.print_stats(20)
  27.         stat.print_callers(20)
  28.         stat.print_callees(20)
  29.     
  30.  
  31.