[izpack-changes] r1893 - izpack-src/trunk/src/doc-reST

noreply at berlios.de noreply at berlios.de
Thu Nov 8 09:19:14 CET 2007


Author: jponge
Date: 2007-11-08 09:18:58 +0100 (Thu, 08 Nov 2007)
New Revision: 1893

Modified:
   izpack-src/trunk/src/doc-reST/build.py
Log:
Use the glob module for getting the files


Modified: izpack-src/trunk/src/doc-reST/build.py
===================================================================
--- izpack-src/trunk/src/doc-reST/build.py	2007-11-08 04:25:11 UTC (rev 1892)
+++ izpack-src/trunk/src/doc-reST/build.py	2007-11-08 08:18:58 UTC (rev 1893)
@@ -35,6 +35,7 @@
 import os
 import shutil
 
+from glob import glob
 from optparse import OptionParser
 from docutils.core import publish_cmdline as publish
 
@@ -45,8 +46,8 @@
 
 def scan_files():
 	print('Scanning files...')
-	rest_files = [ f[0:(len(f) - 4)] for f in os.listdir('.') if f.endswith('.txt') and f != 'pdf-version.txt' ]
-	pictures   = [ f for f in os.listdir('.') if f.endswith('.png') or f.endswith('.jpg') ]
+	rest_files = [ f[0:(len(f) - 4)] for f in glob('*.txt') if f != 'pdf-version.txt' ]
+	pictures   = glob('*.jpg') + glob('*.png')
 	return rest_files, pictures
 
 def copy_files(pictures):



More information about the izpack-changes mailing list