上一页 1 ··· 10 11 12 13 14
摘要: #!/usr/bin/env python # -*- coding:utf-8 -*- class Provice: momo = '中国很好' #静态字段 #构造函数 def __init__(self,name,age,salary,flag): self.Name = name self.A 阅读全文
posted @ 2016-03-07 10:47 fengjian1585 阅读(185) 评论(0) 推荐(0)
摘要: #!/usr/bin/env python # -*- coding:utf-8 -*- ''' from backend import account account.login() account.logout() import backend.account backend.account.l 阅读全文
posted @ 2016-03-07 09:55 fengjian1585 阅读(145) 评论(0) 推荐(0)
摘要: import random #print random.random() #0.522622274753 #print random.randint(1,5) 生成1-5之间的一个随机整数 #print random.randrange(1,3) 生成1-2之间的一个随机整数 阅读全文
posted @ 2016-03-06 21:53 fengjian1585 阅读(162) 评论(0) 推荐(0)
摘要: #!/usr/bin/env python#_*_ coding:utf-8 _*_temp = 'mysqlhelper'func = 'count'modle = __import__(temp)Function = getattr(modle,func) #如果模块中找到字符串,返回函数pri 阅读全文
posted @ 2016-03-06 21:15 fengjian1585 阅读(194) 评论(0) 推荐(0)
摘要: 主程序, #!/usr/bin/env python #_*_ coding:utf-8 _*_ import pickle import os import sys import time import pickle dirname = os.path.dirname(os.path.dirnam 阅读全文
posted @ 2016-03-05 23:36 fengjian1585 阅读(231) 评论(0) 推荐(0)
摘要: #!/usr/bin/env python # -*- coding:utf-8 -*- def auth(func): def wrapper(): user = raw_input('input name: ').strip() if user == 'alex': print '------- 阅读全文
posted @ 2016-03-04 17:45 fengjian1585 阅读(130) 评论(0) 推荐(0)
摘要: import re listall = "adkr20xcv3\actad4/" result = re.search('\w+',listall) print result.group() print '------------------>' print re.findall('[a-zA-Z] 阅读全文
posted @ 2016-03-04 14:26 fengjian1585 阅读(159) 评论(0) 推荐(0)
摘要:     阅读全文
posted @ 2016-03-02 11:26 fengjian1585 阅读(347) 评论(0) 推荐(0)
摘要: #!/usr/bin/env python # -*- coding:utf-8 -*- import os,sys num_count = 0 lock_file = 'lockfile.txt' account_file = 'account.txt' match_flag ='' def lo 阅读全文
posted @ 2016-01-28 16:47 fengjian1585 阅读(291) 评论(0) 推荐(0)
摘要: print cmp(2,3) print cmp(2,2) print cmp(3,2) abs(-1) print bool(0) print bool(-1) False print bool('') False print divmod(3,2) print min([11,22,33,44]) #必须是列表 print max([11,22,33,44]... 阅读全文
posted @ 2016-01-25 11:35 fengjian1585 阅读(341) 评论(0) 推荐(0)
上一页 1 ··· 10 11 12 13 14