随笔分类 -  python

摘要:vim 的配置文件默认是当前用户宿主目录下的.vimrc 文件。下列配置是常用 vim 进行 python 开 发的配置。 " 高亮当前行 set cursorline " 将 TAB 设为四个空格的宽度 set tabstop=4 " 自动缩进 set autoindent " 使用空格代替 TA 阅读全文
posted @ 2018-06-04 11:10 浩0x208哥 阅读(1660) 评论(0) 推荐(0)
摘要:#coding=utf-8a = 'haha'a = "hao"print(a)s = 'Hello World!'print(s.swapcase()) #大写变小写,小写变大写print(s.capitalize()) #只是首字母变大写,其他都小写# print(s.casefold()) # 阅读全文
posted @ 2018-04-02 15:28 浩0x208哥 阅读(2311) 评论(0) 推荐(0)
摘要:#!/usr/bin/python#-*-coding:UTF-8-*- import smtplibimport timeimport os from email.mime.text import MIMETextfrom email.mime.multipart import MIMEMulti 阅读全文
posted @ 2018-04-02 15:20 浩0x208哥 阅读(290) 评论(0) 推荐(0)
摘要:######################非固定参数################## #第一种方式:def send_alert(msg,*users):##*users 是非固定参数,将传过来的参数打包成元祖, for u in users: print("报警发送给:",u)send_al 阅读全文
posted @ 2018-04-02 14:59 浩0x208哥 阅读(452) 评论(0) 推荐(0)
摘要:######################################################### 模块time ####################################### 多用于时间戳与字符串的转换 import timeprint(time.time()) # 阅读全文
posted @ 2018-03-30 14:00 浩0x208哥 阅读(308) 评论(0) 推荐(0)
摘要:下载文件 wget https://bootstrap.pypa.io/get-pip.py --no-check-certificate 执行安装 python get-pip.py 可以做一个软连接 ln -s /usr/local/python27/bin/pip /usr/bin/pip 然 阅读全文
posted @ 2018-03-21 09:49 浩0x208哥 阅读(986) 评论(0) 推荐(0)
摘要:终端的字符颜色是用转义序列控制的,是文本模式下的系统显示功能,和具体的语言无关。 转义序列是以ESC开头,即用\033来完成(ESC的ASCII码用十进制表示是27,用八进制表示就是033)。 格式 :\033[显示方式;前景色;背景色m + 你想要变色的字体:\033[0m 注意:开头部分的三个参 阅读全文
posted @ 2018-03-09 15:40 浩0x208哥 阅读(271) 评论(0) 推荐(0)
摘要:1、在server选项里边输入 http://elporfirio.com:1017/就可以了。 2、server选项里边输入 http://idea.imsxm.com/ 3、server选项里边输入 http://jishujia.wang 4、server选项里边输入 http://idea. 阅读全文
posted @ 2018-03-08 13:16 浩0x208哥 阅读(2083) 评论(0) 推荐(0)