dia r4336 - trunk/plug-ins/python
- From: hans svn gnome org
- To: svn-commits-list gnome org
- Subject: dia r4336 - trunk/plug-ins/python
- Date: Tue, 24 Mar 2009 19:34:50 +0000 (UTC)
Author: hans
Date: Tue Mar 24 19:34:50 2009
New Revision: 4336
URL: http://svn.gnome.org/viewvc/dia?rev=4336&view=rev
Log:
wdeps.py : 2007-06-25 - allow glob pattern for component input
Modified:
trunk/plug-ins/python/wdeps.py
Modified: trunk/plug-ins/python/wdeps.py
==============================================================================
--- trunk/plug-ins/python/wdeps.py (original)
+++ trunk/plug-ins/python/wdeps.py Tue Mar 24 19:34:50 2009
@@ -202,6 +202,16 @@
nReduced += n
f.write("Remove total: %d\n" % (nReduced))
+def UnGlob (comps) :
+ import glob
+ comp_dict = {}
+ for p in comps :
+ g = glob.glob (p)
+ for d in g :
+ if not comp_dict.has_key (d) :
+ comp_dict[d] = 1
+ return comp_dict.keys()
+
def Sorted (dict) :
"given a dictionary with name to number, sort by number"
ret = []
@@ -277,6 +287,7 @@
else :
if not bHaveComponents :
components = string.split(arg, ",")
+ components = UnGlob (components)
# don't GetDeps here cause we need to first evaluate *all* parameters
bHaveComponents = 1
else :
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]