Can anyone explain to me why the following code will return a list if I select 12 files but will return None if I select 13?<br><br>#file: pdf_batch_plot.py<br>#auth: Tim Riley<br>#rev: 0<br>#desc: Allows the selection of multiple pdf files and batch plots them to pdf.
<br>#<br>#Note: This program requires the win32all package for Python as it makes use <br># of Windows API calls to create the open file dialog box as well as <br># COM calls to control AutoCAD.<br>#------------------------------------------------------------------------------
<br>import sys, os<br>import win32ui<br>import win32con<br><br># create an OpenFileDialog using win32ui.CreateFileDialog<br>def GetFiles():<br> dlg = win32ui.CreateFileDialog(1,<br> None,
<br> None, <br> (win32con.OFN_FILEMUSTEXIST|<br> win32con.OFN_EXPLORER|<br> win32con.OFN_ALLOWMULTISELECT
),<br> 'AutoCAD Drawings (*.dwg)|*.dwg||')<br><br> dlg.SetOFNTitle('Select Drawing Files')<br> testvalue = dlg.DoModal()<br> if testvalue == win32con.IDOK:<br> return dlg.GetPathNames
()<br> <br>if __name__ == '__main__':<br> printfiles = GetFiles()<br> print printfiles<br> blah = raw_input('hit enter...')<br><br>