From 4aba116b9ad6b439a41b042ef9c4c3e85a412752 Mon Sep 17 00:00:00 2001 From: steffen123 Date: Fri, 13 Aug 2010 04:10:13 +0200 Subject: [PATCH] allow py27 on windows --- pyfpdb/fpdb.pyw | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pyfpdb/fpdb.pyw b/pyfpdb/fpdb.pyw index e66c6b70..1be08516 100755 --- a/pyfpdb/fpdb.pyw +++ b/pyfpdb/fpdb.pyw @@ -26,13 +26,13 @@ trans.install() # if path is set to use an old version of python look for a new one: # (does this work in linux?) -if os.name == 'nt' and sys.version[0:3] not in ('2.5', '2.6') and '-r' not in sys.argv: +if os.name == 'nt' and sys.version[0:3] not in ('2.5', '2.6', '2.7') and '-r' not in sys.argv: #print "old path =", os.environ['PATH'] dirs = re.split(os.pathsep, os.environ['PATH']) # remove any trailing / or \ chars from dirs: dirs = [re.sub('[\\/]$','',p) for p in dirs] # remove any dirs containing 'python' apart from those ending in 'python25', 'python26' or 'python': - dirs = [p for p in dirs if not re.search('python', p, re.I) or re.search('python25$', p, re.I) or re.search('python26$', p, re.I)] + dirs = [p for p in dirs if not re.search('python', p, re.I) or re.search('python25$', p, re.I) or re.search('python26$', p, re.I) or re.search('python27$', p, re.I)] tmppath = ";".join(dirs) #print "new path =", tmppath if re.search('python', tmppath, re.I): @@ -44,7 +44,7 @@ if os.name == 'nt' and sys.version[0:3] not in ('2.5', '2.6') and '-r' not in sy else: os.execvpe('python', ('python', 'fpdb.pyw', '-r'), os.environ) # first arg is ignored (name of program being run) else: - print _("\npython 2.5 not found, please install python 2.5 or 2.6 for fpdb\n") + print _("\npython 2.5 not found, please install python 2.5, 2.6 or 2.7 for fpdb\n") raw_input(_("Press ENTER to continue.")) exit() else: