cat /usr/local/zabbix/share/zabbix/alertscripts/sed_messages_weixin.py python2.x#!/usr/bin/env python # _*_ coding: utf-8 _*_ # author:chenjianwen # e... ...
分类:
微信 时间:
2019-05-28 12:20:49
阅读次数:
143
宏观上:python2 与 python3 区别: python2 源码不标准,混乱,重复代码太多, python3 统一 标准,去除重复代码。 python2默认编码方式是ascii码 解决方式:在文件的首行:#-*- encoding:utf-8 -*- python3 默认编码方式utf-8 ...
分类:
编程语言 时间:
2019-05-27 13:32:21
阅读次数:
109
[TOC] 数据类型内置方法总结 数字类型内置方法 整型int() 1. 定义方式 age = int(28) int()函数可以将数字转换为整型,直接省去小数部分 2. 常用操作 算术操作 + 比较运算符 3. 长整型 python2 中有长整型概念,python3中没有 4. 存一个值 or 多 ...
分类:
其他好文 时间:
2019-05-26 21:13:32
阅读次数:
164
```python
# coding=UTF-8
# see: https://www.cnblogs.com/victorwu/p/5762665.html
# python2.7 可用
import argparse parser = argparse.ArgumentParser(descri... ...
分类:
编程语言 时间:
2019-05-26 18:24:13
阅读次数:
134
python2.7 版 python3.6 版 python import json import requests import sys if len(sys.argv) ...
分类:
编程语言 时间:
2019-05-26 16:07:43
阅读次数:
97
在一个系统中共存Python2、python3的时候,pip、pip2、pip3使用的时候会报错: c:\Python35\Scripts>pip3Fatal error in launcher: Unable to create process using '"' 解决方法: python3: p ...
分类:
编程语言 时间:
2019-05-25 17:07:44
阅读次数:
136
多继承:先找左边的 新式类:广度优先,最后一个基类先不找,到最后找 经典类:深度优先 顺序查询:MRO列表,F.__mro__ 新式类定义一个类继承object类 基类没有继承关系是经典类,继承了object类是经典类,且经典类没有MRO方法 python2有经典类和新式类,python3只有新式类 ...
分类:
其他好文 时间:
2019-05-24 23:43:06
阅读次数:
151
Python学习路线(Python学习教程_Python学习视频):Python2和Python3你是如何选择的 ...
分类:
编程语言 时间:
2019-05-24 12:44:22
阅读次数:
90
apt-get install python3-pip # Python3 ? ~ pip3 -V pip 9.0.1 from /usr/lib/python3/dist-packages (python 3.6) pip3 install flake8 执行目录的flake检测 python2. ...
分类:
编程语言 时间:
2019-05-24 11:07:24
阅读次数:
111
进入不同语言版本的Python交互环境 py 2 py 3 pip 命令的执行 : py 2 m pip install xxxx py 3 m pip install nose 执行python文件 py 2 a.py py 3 a.py py2: print "hello" py3: print ...
分类:
编程语言 时间:
2019-05-24 00:48:31
阅读次数:
136