home *** CD-ROM | disk | FTP | other *** search
/ Hackers Magazine 57 / CdHackersMagazineNr57.iso / Software / Multimedia / k3d-setup-0.7.11.0.exe / share / k3d / scripts / describe_plugins.py < prev    next >
Text File  |  2008-07-21  |  704b  |  34 lines

  1. #python
  2.  
  3. import k3d
  4.  
  5. factories = k3d.plugin.factory.lookup()
  6.  
  7. application_plugins = []
  8. document_plugins = []
  9.  
  10. for factory in factories :
  11.     if factory.is_application_plugin():
  12.         application_plugins.append(factory.name())
  13.     if factory.is_document_plugin():
  14.         document_plugins.append(factory.name())
  15.  
  16. application_plugins.sort()
  17. document_plugins.sort()
  18.  
  19. print "\nApplication Plugins:"
  20. for plugin in application_plugins:
  21.     print "\t" + plugin
  22. print "\n\t" + "Total: " + str(len(application_plugins))
  23.  
  24. print "\nDocument Plugins:"
  25. for plugin in document_plugins:
  26.     print "\t" + plugin
  27. print "\n\t" + "Total: " + str(len(document_plugins))
  28.  
  29. import sys
  30. sys.stdout.flush()
  31.  
  32. k3d.ui().message("Output sent to console")
  33.  
  34.