08 2018 档案

摘要:在django的setting里加以下配置 阅读全文

posted @ 2018-08-27 14:23 王汝伟 阅读(366) 评论(0) 推荐(0) |

摘要:1.在app下新建一个.py文件 此例commen.py commen.py (内容)(具体怎么导出的也不知道这么写就对了) 阅读全文

posted @ 2018-08-24 11:55 王汝伟 阅读(615) 评论(0) 推荐(0) |

摘要:class BlackMedium: feature='Ugly' def __init__(self,name,addr): self.name=name self.addr=addr def sell_house(self): print('%s 黑中介卖房子啦,傻逼才买呢,但是谁能证明自己不傻 阅读全文

posted @ 2018-08-10 17:49 王汝伟 阅读(139) 评论(0) 推荐(0) |

摘要:import timeimport requestsimport smtplibfrom email.mime.text import MIMETextimport datetimedef SendEmail(fromAdd,toAdd,subject,text): _pwd = "Yeer2016 阅读全文

posted @ 2018-08-10 14:54 王汝伟 阅读(450) 评论(0) 推荐(0) |

摘要:import pymysql,os,time,xlwtpymysql.install_as_MySQLdb()try: #创建一个excel工作簿,编码utf-8,表格中支持中文 wb=xlwt.Workbook(encoding='utf-8') #创建一个sheet sheet=wb.add_s 阅读全文

posted @ 2018-08-10 14:33 王汝伟 阅读(232) 评论(0) 推荐(0) |

摘要:import requeststry: code = requests.get("https://api.sudaizhijia.cm/").status_code print(code)except requests.exceptions.ConnectionError as e: print(e 阅读全文

posted @ 2018-08-08 16:48 王汝伟 阅读(469) 评论(0) 推荐(0) |

摘要:import itchat,timefrom itchat.content import *itchat.auto_login(enableCmdQR=-1)while True: for i in range(1,10): if i == 3: friend_cijingchangcun = it 阅读全文

posted @ 2018-08-08 15:31 王汝伟 阅读(932) 评论(0) 推荐(0) |

摘要:#!/usr/local/bin/python#-*- coding:utf-8 -*-import http.clientimport urllibimport random host = "106.ihuyi.com"sms_send_uri = "/webservice/sms.php?met 阅读全文

posted @ 2018-08-08 10:56 王汝伟 阅读(208) 评论(0) 推荐(0) |

摘要:import smtplibfrom email.mime.text import MIMETextdef SendEmail(fromAdd,toAdd,subject,text): _pwd = "Yeer2016@sudai" #授权码 msg = MIMEText(text) msg["Su 阅读全文

posted @ 2018-08-07 18:36 王汝伟 阅读(98) 评论(0) 推荐(0) |

摘要:user, password = 'db', '12345'# 当装饰器也需要参入参数时我们需要给装饰器再加一层函数,# 此时装饰器接受到的方法需要进入第二层函数进行接受,# 第一层需要接受装饰器自己的参数def login(login_type): def outer_wrapper(func): 阅读全文

posted @ 2018-08-06 16:55 王汝伟 阅读(113) 评论(0) 推荐(0) |

博客园  ©  2004-2026
浙公网安备 33010602011771号 浙ICP备2021040463号-3