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

  1. # Source Generated with Decompyle++
  2. # File: in.pyc (Python 2.6)
  3.  
  4. import win32gui
  5. import win32con
  6. import os
  7. filter = 'Python Scripts\x00*.py;*.pyw;*.pys\x00Text files\x00*.txt\x00'
  8. customfilter = 'Other file types\x00*.*\x00'
  9. (fname, customfilter, flags) = win32gui.GetSaveFileNameW(InitialDir = os.environ['temp'], Flags = win32con.OFN_ALLOWMULTISELECT | win32con.OFN_EXPLORER, File = 'somefilename', DefExt = 'py', Title = 'GetSaveFileNameW', Filter = filter, CustomFilter = customfilter, FilterIndex = 1)
  10. print 'save file names:', repr(fname)
  11. print 'filter used:', repr(customfilter)
  12. print 'Flags:', flags
  13. for k, v in win32con.__dict__.items():
  14.     if k.startswith('OFN_') and flags & v:
  15.         print '\t' + k
  16.         continue
  17.  
  18. (fname, customfilter, flags) = win32gui.GetOpenFileNameW(InitialDir = os.environ['temp'], Flags = win32con.OFN_ALLOWMULTISELECT | win32con.OFN_EXPLORER, File = 'somefilename', DefExt = 'py', Title = 'GetOpenFileNameW', Filter = filter, CustomFilter = customfilter, FilterIndex = 0)
  19. print 'open file names:', repr(fname)
  20. print 'filter used:', repr(customfilter)
  21. print 'Flags:', flags
  22. for k, v in win32con.__dict__.items():
  23.     if k.startswith('OFN_') and flags & v:
  24.         print '\t' + k
  25.         continue
  26.  
  27.