随笔分类 - python3
摘要:import urllib.request # cd C:\Python36-32\Scripts # pip install BeautifulSoup from bs4 import BeautifulSoup def vote(get_url, post_url, option): # 访问投
        阅读全文
                
摘要:本文主要是用163邮箱,其他邮箱也类似,把邮箱账号和密码、SMTP服务器和端口换成相应的即可。 # coding:utf-8 import smtplib from email.mime.text import MIMEText from email.utils import formataddr 
        阅读全文
                
摘要:import time import schedule # cd C:\Python36-32\Scripts pip install schedule # py文件名字不能叫schedule,否则会报module 'schedule' has no attribute 'every' def he
        阅读全文
                
摘要:import psutil # cd C:\Python36-32\Scripts pip install psutil # 获取本机磁盘使用率和剩余空间G信息 def get_disk_info(): # 循环磁盘分区 content = "" for disk in psutil.disk_pa
        阅读全文
                
摘要:提示: 1.python对空格和缩进要求比较严格(4个空格) 2.方法、判断等结尾注意加冒号 3.不需要end等结尾 1.输出 print("Hello, World!") python hello.py 2.判断 if 条件1: print("1") elif 条件2: print("2") el
        阅读全文
                
摘要:1、Python 下载地址:https://www.python.org/downloads/ 2、Django 下载地址:https://www.djangoproject.com/download/ tree #树形显示项目目录结构 django页面模板标签 1.注释 {# 这是一个注释 #} 
        阅读全文
                
                    
                
浙公网安备 33010602011771号