home *** CD-ROM | disk | FTP | other *** search
- # Source Generated with Decompyle++
- # File: in.pyc (Python 2.6)
-
- import win32gui
- import win32con
- import os
- filter = 'Python Scripts\x00*.py;*.pyw;*.pys\x00Text files\x00*.txt\x00'
- customfilter = 'Other file types\x00*.*\x00'
- (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)
- print 'save file names:', repr(fname)
- print 'filter used:', repr(customfilter)
- print 'Flags:', flags
- for k, v in win32con.__dict__.items():
- if k.startswith('OFN_') and flags & v:
- print '\t' + k
- continue
-
- (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)
- print 'open file names:', repr(fname)
- print 'filter used:', repr(customfilter)
- print 'Flags:', flags
- for k, v in win32con.__dict__.items():
- if k.startswith('OFN_') and flags & v:
- print '\t' + k
- continue
-
-