[Debtags-commits] [svn] r1862 - python
Enrico Zini
enrico at costa.debian.org
Sun Aug 27 21:00:18 UTC 2006
Author: enrico
Date: Sun Aug 27 21:00:18 2006
New Revision: 1862
Modified:
python/ (props changed)
python/wxssearch
Log:
r3199 at viaza: enrico | 2006-08-27 15:51:43 +0100
Relevant tag list works
Modified: python/wxssearch
==============================================================================
--- python/wxssearch (original)
+++ python/wxssearch Sun Aug 27 21:00:18 2006
@@ -50,6 +50,7 @@
self.subcoll = fullcoll
def setQuery(self, query):
+ print "SetQuery", query
input = subprocess.Popen("apt-cache search " + query, shell=True, stdout = subprocess.PIPE, close_fds = True)
# Read the package list and create the subcollection
@@ -59,12 +60,18 @@
#print pkg
pkgs.append(pkg)
+ print len(pkgs), "pkgs"
+
subcoll = self.fullcoll.choosePackages(pkgs)
+ print subcoll.packageCount(), subcoll.tagCount()
+
relIndex = Debtags.relevanceIndexFunction(self.fullcoll, subcoll)
# Get all the tags sorted by increasing relevance
- self.interesting = sorted(self.subcoll.iterTags(), lambda b, a: cmp(relIndex(a), relIndex(b)))
+ self.interesting = sorted(subcoll.iterTags(), lambda b, a: cmp(relIndex(a), relIndex(b)))
+
+ print "I", len(self.interesting)
# Notify the change
e = Model.ModelEvent(Model.wxEVT_CHANGED)
@@ -82,6 +89,7 @@
return self.model.interesting[row]
def modelChanged(self, event):
+ print "size", len(self.model.interesting)
self.SetItemCount(len(self.model.interesting))
More information about the Debtags-commits
mailing list