Back to index

system-config-printer  1.3.9+20120706
profile-ppds.py
Go to the documentation of this file.
00001 #!/usr/bin/python
00002 import cups
00003 import cupshelpers
00004 import hotshot
00005 import hotshot.stats
00006 
00007 ppds = cupshelpers.ppds.PPDs (cups.Connection ().getPPDs ())
00008 prof = hotshot.Profile ("a.prof")
00009 prof.runcall (lambda: ppds.getPPDNameFromDeviceID('','',''))
00010 prof.close ()
00011 stats = hotshot.stats.load ("a.prof")
00012 stats.sort_stats ('time')
00013 stats.print_stats (100)