python如何给软件设置到期失效

#!/usr/bin/env python
# -*- coding: utf-8 -*-
 
import time
 
def now():
    return time.strftime('%Y-%m-%d %H:%M:%S',time.localtime(time.time()))
     
s = '2018-10-26 00:00:00'
print now()
if now() > s:
    print '已过期,无法正常使用'
else:
    print '未过期,可以正常使用'



#s指的是你想要的失效时间。
#now()指的是当前时间。

python如何给软件设置到期失效

#!/usr/bin/env python
# -*- coding: utf-8 -*-
import time
def now():
    return time.strftime('%Y-%m-%d %H:%M:%S',time.localtime(time.time()))
     
s = '2018-10-06 00:00:00'
print now()
if now() > s:
    print '已过期,无法正常使用'
else:
    print '未过期,可以正常使用'

python如何给软件设置到期失效