随笔分类 -  Python

摘要:文件压缩 解压文件: 阅读全文
posted @ 2017-09-25 07:32 aWolfMan 阅读(298) 评论(0) 推荐(0) 编辑
摘要:有天一个女士出门散步,路过一个建筑工地,看到三个男人在干活。她问第一个男人,“你在干什么呢?”,第一个男人被问得很烦,咆哮道,“你没看到我在码砖吗?”。她对回答不满意,然后问第二个男人他在干什么。第二个男人回答,“我正在砌墙”,然后转移注意力到第一个男人,他说,“嘿,你码过头了,你要把最后一块砖拿掉 阅读全文
posted @ 2017-09-13 07:28 aWolfMan 阅读(20795) 评论(5) 推荐(7) 编辑
摘要:import re def string_match(match_keys,string): for each_key in match_keys: if each_key not in string: return False return True def repace_match_key(match_keys,string): ... 阅读全文
posted @ 2017-09-10 21:26 aWolfMan 阅读(246) 评论(0) 推荐(0) 编辑
摘要:摘要链接: python第三方库——xlrd和xlwt操作Excel文件学习 :http://blog.csdn.net/wangkai_123456/article/details/50457284 python操作Excel读写(使用xlrd和xlrt) : http://blog.csdn.n 阅读全文
posted @ 2017-09-07 22:49 aWolfMan 阅读(85557) 评论(0) 推荐(2) 编辑
摘要:跟随练习: 引自:https://www.liaoxuefeng.com/wiki/0014316089557264a6b348958f449949df42a6d3a2e542c000/00143193331387014ccd1040c814dee8b2164bb4f064cff000 字符串是编程 阅读全文
posted @ 2017-09-06 21:55 aWolfMan 阅读(287) 评论(0) 推荐(0) 编辑
该文被密码保护。
posted @ 2017-09-06 21:03 aWolfMan 阅读(3) 评论(0) 推荐(0) 编辑
摘要:摘要: python中telnetlib模块的使用: http://blog.csdn.net/five3/article/details/8099997 python实现telnet: http://blog.csdn.net/kevin66654/article/details/51993275 阅读全文
posted @ 2017-09-05 23:17 aWolfMan 阅读(363) 评论(0) 推荐(0) 编辑
摘要:摘要: pyserial module: https://github.com/tbusf/pyserial Python使用pyserial进行串口通信:http://blog.csdn.net/log1100/article/details/54380325 串口通讯的python模块——pyS 阅读全文
posted @ 2017-09-05 23:13 aWolfMan 阅读(6277) 评论(2) 推荐(1) 编辑
摘要:import matplotlib.pyplot as plt #plt用于显示图片 import matplotlib.image as mping #mping用于读取图片 import datetime as dt import matplotlib.dates as mdates from pylab import * def draw_trend_chart(dates,y): ... 阅读全文
posted @ 2017-09-02 14:06 aWolfMan 阅读(8305) 评论(0) 推荐(0) 编辑
摘要:from tkinter import * import os def button_click1(): try: filePath = r'D:\CloudMusic' os.system("explorer.exe %s"%filePath) app.destroy() except Exception as ex: ... 阅读全文
posted @ 2017-08-29 23:36 aWolfMan 阅读(275) 评论(0) 推荐(0) 编辑
摘要:import tkinter.messagebox try: fileContent = open("abnormal.txt") fileContent.close() print("over") #把异常消息赋予一个"ex"变量 except Exception as ex: print(ex) tkinter.messagebox.showinfo... 阅读全文
posted @ 2017-08-29 22:46 aWolfMan 阅读(1520) 评论(0) 推荐(1) 编辑
摘要:python3爬虫 - cookie登录实战: http://blog.csdn.net/pipisorry/article/details/47948065 大神网址链接: http://blog.csdn.net/pipisorry 阅读全文
posted @ 2017-08-27 22:03 aWolfMan 阅读(105) 评论(0) 推荐(0) 编辑
摘要:1. 查看文本中的单行是否是空行 2. 替换文件中的指定字符 阅读全文
posted @ 2017-08-27 21:52 aWolfMan 阅读(146) 评论(0) 推荐(0) 编辑
摘要:from tkinter import * def write_to_file(): fileContent = open("deliveries.txt","a") fileContent.write(depot.get()+"\n") fileContent.write(description.get()+"\n") fileContent.write(ad... 阅读全文
posted @ 2017-08-22 23:05 aWolfMan 阅读(764) 评论(0) 推荐(0) 编辑
摘要:import pygame.mixer from tkinter import * sounds = pygame.mixer sounds.init() def wait_finish(channel): while channel.get_busy(): pass def button_click1(): s = sounds.Sound("chimes... 阅读全文
posted @ 2017-08-21 23:48 aWolfMan 阅读(220) 评论(0) 推荐(0) 编辑
摘要:操作相关的文件: 阅读全文
posted @ 2017-08-20 21:21 aWolfMan 阅读(233) 评论(0) 推荐(0) 编辑
摘要:def get_info_byName(name): result_f = open("participant_info.txt") s = {} for each_line in result_f: (s['id'],s['name'],s['country'],s['average'],s['board'],s['age']) = each_line.... 阅读全文
posted @ 2017-08-16 21:49 aWolfMan 阅读(334) 评论(0) 推荐(0) 编辑
摘要:from email.mime.text import MIMEText from email.header import Header from smtplib import SMTP_SSL import urllib.request import time def get_weather_msg(): page = urllib.request.urlopen("http://... 阅读全文
posted @ 2017-08-14 23:00 aWolfMan 阅读(307) 评论(0) 推荐(0) 编辑