- Timestamp:
- Oct 21, 2007 12:01:29 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/testScripts/NBsvnCommand.py
r630 r648 2 2 3 3 import os 4 import urllib2 5 import re 4 6 5 7 import NBlogMessages … … 23 25 retVal='Error' 24 26 return retVal 27 28 29 #------------------------------------------------------------------------ 30 # Function which returns the latest stable version of a project 31 #------------------------------------------------------------------------ 32 def latestStableVersion(project) : 33 url='https://projects.coin-or.org/svn/'+project+'/stable' 34 handle=urllib2.urlopen(url) 35 html=handle.read() 36 handle.close() 37 38 # In html code find the latest version number 39 # <li><a href="3.2/">3.2/</a></li> 40 # <li><a href="3.3/">3.3/</a></li> 41 r=r'<li><a href="(\d*\.\d*)/">(\d*\.\d*)/</a></li>' 42 findResult=re.findall(r,html) 43 latestStableVersionRepeated2Times = findResult[-1:][0] 44 latestStableVersion=latestStableVersionRepeated2Times[0] 45 return latestStableVersion 46 47 48
Note: See TracChangeset
for help on using the changeset viewer.