home *** CD-ROM | disk | FTP | other *** search
/ Maximum CD 2010 November / maximum-cd-2010-11.iso / DiscContents / calibre-0.7.13.msi / file_2717 (.txt) < prev    next >
Encoding:
Python Compiled Bytecode  |  2010-08-06  |  815 b   |  25 lines

  1. # Source Generated with Decompyle++
  2. # File: in.pyc (Python 2.6)
  3.  
  4. from win32com.shell import shell
  5. from win32com.shell.shellcon import *
  6. sf = shell.SHGetDesktopFolder()
  7. print 'Shell Folder is', sf
  8. names = []
  9. for i in sf:
  10.     name = sf.GetDisplayNameOf(i, SHGDN_NORMAL)
  11.     names.append(name)
  12.  
  13. enum = sf.EnumObjects(0, SHCONTF_FOLDERS | SHCONTF_NONFOLDERS | SHCONTF_INCLUDEHIDDEN)
  14. num = 0
  15. for i in enum:
  16.     num += 1
  17.  
  18. if num != len(names):
  19.     print 'Should have got the same number of names!?'
  20.  
  21. print 'Found', len(names), 'items on the desktop'
  22. for name in names:
  23.     print name
  24.  
  25.