全部博文(30)
发布时间:2013-12-18 15:18:27
#!/usr/bin/pythonimport stringalphas = string.letters + '_'nums = string.digitsprint 'Welcome to the Identifier Checker v1.0'print 'Testees must be at least 2 chars long.'myInput = raw_input('Identifier to test?')if len(myInput) > 1: if myInput[0] not in alph.........【阅读全文】
发布时间:2013-12-12 10:37:16
#!/usr/bin/python'makeTextFile.py -- create text file'import os,sysls = os.linesepwhile True: if os.path.exists('a'): print "ERROR: '%s' already exists" % 'a'# br.........【阅读全文】
发布时间:2013-12-04 17:28:16
#/usr/bin/python#Created by rs.wangimport sys,os,timemysql_usr = 'root'mysql_pwd = 'root'mysql_db = 'mysql'mysql_charset = 'gb2312'bk_path = '/home/wangrs/'cmd_path = '/usr/bin/'Logs_path = bk_path + 'Logs'#log_defdef writeLogs(filename,contents): f = file(fi.........【阅读全文】