From 0148e4348ea3070e93f7191dc41043e218a2d41d Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Mon, 25 Oct 2004 22:53:36 +0000 Subject: [PATCH] Doc and comment updates git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30097 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- wxPython/wxversion/wxversion.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/wxPython/wxversion/wxversion.py b/wxPython/wxversion/wxversion.py index ca7f2c5055..26c15e62c2 100644 --- a/wxPython/wxversion/wxversion.py +++ b/wxPython/wxversion/wxversion.py @@ -53,6 +53,9 @@ that and only use wxversion if needed. For example, for py2exe:: wxversion.select('2.5') import wx +More documentation on wxversion and multi-version installs can be +found at: http://wiki.wxpython.org/index.cgi/MultiVersionInstalls + """ import sys, os, glob, fnmatch @@ -103,8 +106,8 @@ def select(versions): # otherwise, raise an exception raise VersionError("A previously selected wx version does not match the new request.") - # If we get here then this is the first time wxversion is used. - # Ensure that wxPython hasn't been imported yet. + # If we get here then this is the first time wxversion is used, + # ensure that wxPython hasn't been imported yet. if sys.modules.has_key('wx') or sys.modules.has_key('wxPython'): raise VersionError("wxversion.require() must be called before wxPython is imported") @@ -220,11 +223,12 @@ class _wxPackageInfo(object): def Score(self, other): score = 0 - # whatever version components given in other must match exactly + # whatever number of version components given in other must + # match exactly minlen = min(len(self.version), len(other.version)) if self.version[:minlen] != other.version[:minlen]: return 0 - score += 1 # todo: should it be +=minlen to reward longer matches? + score += 1 for opt in other.options: if opt in self.options: -- 2.47.2