[Swift-commit] r3050 - SwiftApps/SIDGrid/swift/projects/andric/peakfit_pilots/PK2/turnpointAnalysis/scripts

noreply at svn.ci.uchicago.edu noreply at svn.ci.uchicago.edu
Wed Aug 5 16:15:03 CDT 2009


Author: andric
Date: 2009-08-05 16:15:03 -0500 (Wed, 05 Aug 2009)
New Revision: 3050

Added:
   SwiftApps/SIDGrid/swift/projects/andric/peakfit_pilots/PK2/turnpointAnalysis/scripts/untarSupp.py
Log:
this looks specifically for '*.tgz' files rather than building a list of all files in the dir

Added: SwiftApps/SIDGrid/swift/projects/andric/peakfit_pilots/PK2/turnpointAnalysis/scripts/untarSupp.py
===================================================================
--- SwiftApps/SIDGrid/swift/projects/andric/peakfit_pilots/PK2/turnpointAnalysis/scripts/untarSupp.py	                        (rev 0)
+++ SwiftApps/SIDGrid/swift/projects/andric/peakfit_pilots/PK2/turnpointAnalysis/scripts/untarSupp.py	2009-08-05 21:15:03 UTC (rev 3050)
@@ -0,0 +1,33 @@
+#!/usr/bin/python
+
+import os
+import fnmatch
+import commands
+import time
+
+
+def finder(L,value):
+    listsubset = []
+    for ff in L:
+        if fnmatch.fnmatch(ff,value):
+            listsubset += [ff]
+
+    return listsubset
+    
+
+
+baseDir = os.getenv("cnari")+"/swift/projects/andric/peakfit_pilots/PK2/turnpointAnalysis"
+os.chdir(baseDir+"/turning2_outlh")
+print os.getcwd()
+
+thefiles = os.listdir(os.getcwd())
+print "number of files in this dir: "+`len(thefiles)`+" :: "+time.ctime()
+tgzfiles = finder(thefiles,"*.tgz")
+print "number of tgz files in this dir: "+`len(tgzfiles)`+" :: "+time.ctime()
+
+print "Starting untar "+time.ctime()
+for tt in tgzfiles:
+    os.system("tar -xzf "+tt)
+
+
+print "Finished at "+time.ctime()




More information about the Swift-commit mailing list