上一页 1 ··· 9 10 11 12 13 14 15 16 17 ··· 19 下一页
摘要: 1 #docx文档题库包含很多段,每段一个题目,格式为:问题。(答案) 2 #数据库datase.db中tiku表包含kechengmingcheng、zhanngji、timu、daan四个字段 3 import sqlite3 4 from docx import Document 5 6 doc = Document('《Python程序设计》题库.docx') 7 8... 阅读全文
posted @ 2017-06-20 08:14 JustLittle 阅读(765) 评论(0) 推荐(0)
摘要: 使用pip安装Python扩展库memory_profiler 1 from memory_profiler import profile 2 3 @profile #修饰器 4 def isPrime(n): 5 if n == 2: 6 return True 7 for i in range(2,int(n**0.5)+2): 8 ... 阅读全文
posted @ 2017-06-19 17:36 JustLittle 阅读(365) 评论(0) 推荐(0)
摘要: Stack.py 单元测试:pTest.py 阅读全文
posted @ 2017-06-19 17:22 JustLittle 阅读(261) 评论(0) 推荐(0)
摘要: 1 while True: 2 x =input('Pleaes input:') 3 try: 4 x=int(x) 5 print('You have input {0}'.format(x)) 6 break 7 except Exception as e: 8 prin... 阅读全文
posted @ 2017-06-19 16:42 JustLittle 阅读(719) 评论(0) 推荐(0)
摘要: 根据不同标准可将投资基金划分为以下几类: 1、根据基金单位是否可增加或赎回,投资基金可分为开放式基金和封闭式基金 开放式基金是指基金设立后,投资者可以随时申购或赎回基金单位,基金规模不固定的投资基金;封闭式基金是指基金规模在发行前已确定,在发行完毕后的规定期限内,基金规模固定不变的投资基金。 2、根 阅读全文
posted @ 2017-06-19 13:49 JustLittle 阅读(294) 评论(0) 推荐(0)
摘要: 1. 根据上市地区可以分为:我国上市公司的股票有A股、B股、H股、N股和S股等的区分。这一区分主要依据股票的上市地点和所面对的投资者而定。 A股 A股的正式名称是人民币普通股票。它是由我国境内的公司发行,供境内机构、组织或个人(不含台、港、澳投资者)以人民币认购和交易的普通股股票。 1990年,我国 阅读全文
posted @ 2017-06-16 12:42 JustLittle 阅读(307) 评论(0) 推荐(0)
摘要: 1 import random 2 import os 3 import tkinter 4 import tkinter.ttk 5 from docx import Document 6 columnsNumber = 4 7 def main(rowsNumbers=20,grade=4): 阅读全文
posted @ 2017-06-15 00:03 JustLittle 阅读(5404) 评论(1) 推荐(0)
摘要: 1 import zipfile 2 fp=zipfile.ZipFile('/Users/c2apple/Desktop/彩屏/旭威XW-6600.zip','r') 3 for f in fp.filelist: 4 print(f) 5 # 6 # 7 # 8 # 9 fp.close() 10 11 import rarfile 12 r=rarfil... 阅读全文
posted @ 2017-06-14 20:58 JustLittle 阅读(268) 评论(0) 推荐(0)
摘要: 1 ''' 2 使用xlrd模块写入Excel文件 3 ''' 4 import xlrd 5 book=xlrd.open_workbook(r'/Users/c2apple/Desktop/纪录/测试报告/张涛文件盘/骆洪文模版/彩屏带杨升/ZD-QR-730114 彩屏软件测试报告 00版.xlsx')#打开Excel文件 6 sheet1=book.sheet_b... 阅读全文
posted @ 2017-06-14 20:22 JustLittle 阅读(1965) 评论(0) 推荐(0)
摘要: 1 #计算文件的CRC32值 2 import sys 3 import zlib 4 import os.path 5 filename=sys.argv[1] 6 print(filename) 7 if os.path.isfile(filename): 8 fp=open(filename,'rb') 9 contents=fp.read() 10 ... 阅读全文
posted @ 2017-06-13 22:56 JustLittle 阅读(630) 评论(0) 推荐(0)
上一页 1 ··· 9 10 11 12 13 14 15 16 17 ··· 19 下一页