- 博客(6)
- 收藏
- 关注
原创 Python2 与 Python3 的区别
1) 核心类差异Python3对Unicode字符的原生支持。Python2 中使用 ASCII 码作为默认编码方式导致 string 有两种类型 str 和 unicode,Python3 只支持 unicode 的 string。Python3采用的是绝对路径的方式进行import。Python2 中相对路径的 import 会导致标准库导入变得困难(想象一下,同一目录下有 file...
2019-05-06 12:13:40 77
原创 python2和Python3相关工具包在不同环境的安装问题
windows 环境Python2 无法安装mysqlclient。Python3 无法安装MySQL-python、flup、functools32、Gooey、 Pywin32、 webencodings。matplotlib 在 python3 环境中安装报错:The following required packages can not be built:freetype, png。需...
2019-05-06 11:58:30 307
原创 python时间模块-time和datetime
python 中时间表示方法有:时间戳,即从1975年1月1日00:00:00到现在的秒数;格式化后的时间字符串;时间struct_time 元组。 struct_time元组中元素主要包括tm_year(年)、tm_mon(月)、tm_mday(日)、tm_hour(时)、tm_min(分)、tm_sec(秒)、tm_wday(weekday0 - 6(0表示周日))、tm_yday(一年中的...
2018-08-22 18:28:18 276
原创 通过登录微信个人订阅号爬取微信公众号文章信息
# -*- coding: utf-8 -*-from lxml import etreefrom bs4 import BeautifulSoupfrom pymongo import *from selenium import webdriverimport timeimport jsonimport requestsimport reimport randomfrom ...
2018-08-12 09:22:52 1469
原创 服务器端uwsgi配置文件
[uwsgi]socket=127.0.0.1:7000# 项目目录chdir=/www/cheese/python# 项目启动文件目录wsgi-file=/www/cheese/python/manager.pycallable = appprocesses=4threads=2master=Truepidfile=uwsgi.pid;daemonize=uwsgi.log...
2018-07-31 10:39:05 2586
转载 Linux解决MySQL-python安装失败问题
使用python的pip直接安装MySQL-python的时候遇到如下报错: Collecting mysql-python Using cached MySQL-python-1.2.5.zip Complete output from command python setup.py egg_info: sh: 1: mysql_config: not found...
2018-07-31 10:38:45 763
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人