您的位置:首页 > 运维架构 > Apache

the share memory of Apache

2009-08-13 12:49 387 查看
# two param
# -nt
def isNewthan(x, y):
t1 = int(os.stat(x).st_ctime)
t2 = int(os.stat(y).st_ctime)
if t1 > t2:
return 0
else:
return 1

# -ot
def isOlderthan(x, y):
t1 = int(os.stat(x).st_ctime)
t2 = int(os.stat(y).st_ctime)
if t1 < t2:
return 0
else:
return 1

# -eq
def isEqual(x, y):
try:
x = int(x)
y = int(y)
if x == y:
return 0
else:
return 1
except ValueError:
return 1
# -ge
def isGraterEqual(x, y):
try:
x = int(x)
y = int(y)
if x >= y:
return 0
else:
return 1
except ValueError:
return 1

# -gt
def isGranterthan(x, y):
try:
x = int(x)
y = int(y)
if x > y:
return 0
else:
return 1
except ValueError:
return 1
# -le
def isLessEqual(x, y):
try:
x = int(args.x)
y = int(args.y)
if x <= y:
return 0
else:
return 1
except ValueError:
return 1
# -lt
def isLessthan(x, y):
try:
x = int(x)
y = int(y)
if x < y:
return 0
else:
return 1
except ValueError:
return 1
# -ne
def isNotEqual(x, y):
try:
x = int(x)
y = int(y)
if x != y:
return 0
else:
return 1
except ValueError:
return 1
# -a
def isAnd(x, y):
if bool(x) == True and bool(y) == True:
return 0
else:
return 1
# -o
def isOR(x, y):
if bool(x) == True or bool(y) == True:
return 0
else:
return 1
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐