上一页 1 ··· 19 20 21 22 23 24 25 26 27 ··· 87 下一页

2017年11月12日

摘要: 解析代码如下: 阅读全文
posted @ 2017-11-12 16:37 帅胡 阅读(1713) 评论(0) 推荐(0) 编辑
摘要: SELECT * FROM sqlite_master 阅读全文
posted @ 2017-11-12 09:47 帅胡 阅读(771) 评论(0) 推荐(0) 编辑

2017年11月9日

摘要: 默认输入top命令后进入的是交互模式,默认显示的TOP程序界面如下图所示: 我们注意到进程的内存区域数据很长一串,主要是因为这里用的单位是k表示的,我们可以修改显示的单位,在界面上直接输入E可以改变显示的单位,如下所示 连续输入E就可以在k、m、g、t、p、e之间循环,按你自己需要设置 这里显示的C 阅读全文
posted @ 2017-11-09 12:45 帅胡 阅读(430) 评论(0) 推荐(0) 编辑

2017年11月6日

摘要: 关于写excel的格式控制,比如颜色等等 Examples Generating Excel Documents Using Python’s xlwt Here are some simple examples using Python’s xlwt library to dynamically 阅读全文
posted @ 2017-11-06 12:34 帅胡 阅读(18402) 评论(0) 推荐(1) 编辑
摘要: 1 Python对Excel的读写主要有xlrd、xlwt、xlutils、openpyxl、xlsxwriter几种。 2 3 1.xlrd主要是用来读取excel文件 4 5 import xlrd 6 7 workbook = xlrd.open_workbook(u'有趣装逼每日数据及趋势.xls') 8 9 sheet_names= work... 阅读全文
posted @ 2017-11-06 12:31 帅胡 阅读(1280) 评论(0) 推荐(0) 编辑
摘要: 1 #!/usr/bin/env python 2 #-*- coding:utf-8 -*- 3 4 ####################################################### 5 # 用于批量删除excel的指定行 # 6 # 适用于所有office,前提需要安装pywin32... 阅读全文
posted @ 2017-11-06 12:21 帅胡 阅读(4261) 评论(0) 推荐(1) 编辑
摘要: 1 from win32com.client import Dispatch 2 import win32com.client 3 import time 4 5 # 获取excel 对象 6 7 excel = win32com.client.Dispatch('Excel.Application') 8 9 """ 10 0代表隐藏对象,但可以通过菜单再显示 11 -... 阅读全文
posted @ 2017-11-06 12:15 帅胡 阅读(4655) 评论(0) 推荐(1) 编辑

2017年10月26日

摘要: SMTP(Simple Mail Transfer Protocol)即简单邮件传输协议,它是一组用于由源地址到目的地址传送邮件的规则,由它来控制信件的中转方式。 python的smtplib提供了一种很方便的途径发送电子邮件。它对smtp协议进行了简单的封装。 Python创建 SMTP 对象语法 阅读全文
posted @ 2017-10-26 23:51 帅胡 阅读(1229) 评论(2) 推荐(0) 编辑

2017年10月21日

摘要: 用了几天的PyCharm,发现确实在编写Python代码上非常好用,但有一点体验不太好,就是代码编写时要按照PEP8代码风格编写,不然会有波浪线的警告信息。解决方法如下: 方法一: 将鼠标移到提示的地方,按alt+Enter,选择忽略(Ignore)这个错误即好。 方法二 打开:File - Set 阅读全文
posted @ 2017-10-21 17:36 帅胡 阅读(1021) 评论(0) 推荐(0) 编辑

2017年10月17日

摘要: 1 def str_to_hex(s): 2 return ' '.join([hex(ord(c)).replace('0x', '') for c in s]) 3 4 def hex_to_str(s): 5 return ''.join([chr(i) for i in [int(b, 16) for b in s.split(' ')]]) 6 ... 阅读全文
posted @ 2017-10-17 13:25 帅胡 阅读(23232) 评论(0) 推荐(1) 编辑
上一页 1 ··· 19 20 21 22 23 24 25 26 27 ··· 87 下一页

导航