自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(5)
  • 收藏
  • 关注

原创 python list嵌套字典操作

#encoding:utf-8import ospersonlist=[{'name':'zhangsan'},{'name':'lisi'},{'name':'wangwu'}]zhangsan = personlist[0]['name'] #personlist[0].name=personlist['name']print u'姓名:%s' %zhangsan#将所有的...

2018-03-16 17:58:17 14729

原创 Python 配置文件

1.创建配置文件config.iniconfig.ini写入配置内容[EMAIL]sender = sender@163.commail_pass = password2.创建读取配置的readConfig.py文件readConfig.py文件源码:import osimport configparserdef getConfig(section,key): config = configparser.ConfigParser() #获取配置文件的真实

2021-01-06 11:16:44 1026

原创 python 日志

import loggingimport logging.handlersimport osimport timeclass Logs(object): def __init__(self): self.logger = logging.getLogger("") # 设置输出的等级 # LEVELS = {'NOSET': logging.NOTSET, # 'DEBUG': logging.DEBU.

2021-01-06 11:01:15 87

转载 Python中判断list

Python中判断list是否为空有以下两种方式:方式一:1 list_temp = []2 if len(list_temp):3 # 存在值即为真4 else:5 # list_temp是空的方式二:1 list_temp = []2 if list_temp:3 # 存在值即为真4 else:5 # list_temp是空的以上两种方法均可以...

2018-03-16 17:22:26 1935

原创 python flask mysql安装

1.打开cmd命令行,进入python虚拟环境 用activate激活虚拟环境 如果没有则创建虚拟环境  输入命令:virtualenv virtualenv2进入virtualenv Script目录下,安装flask 输入命令pip install flask3安装mysql 输入命令 pip install mysql-python;没有vs 编译器,提示点击如下网站 Download Mi...

2018-03-08 11:29:52 240

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除