appypod-rattail/__init__.py

15 lines
607 B
Python
Raw Normal View History

import os.path
2009-06-29 07:06:01 -05:00
def getPath(): return os.path.dirname(__file__)
2010-02-01 04:09:26 -06:00
def versionIsGreaterThanOrEquals(version):
'''This method returns True if the current Appy version is greater than or
equals p_version. p_version must have a format like "0.5.0".'''
import appy.version
if appy.version.short == 'dev':
# We suppose that a developer knows what he is doing, so we return True.
return True
else:
paramVersion = [int(i) for i in version.split('.')]
2010-02-04 07:41:51 -06:00
currentVersion = [int(i) for i in appy.version.short.split('.')]
2010-02-01 04:09:26 -06:00
return currentVersion >= paramVersion