自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(4)
  • 问答 (1)
  • 收藏
  • 关注

原创 python 疯狂填词 mad libs

import osimport re# 读取文本文件file = open(r'F:\workspace\python\text\madlib.txt')strs = file.read()#sub函数不改变原字符串adjective = input("Enter a adjective:")adjective_regex = re.compile('ADJECTIVE')strs

2017-08-31 22:56:12 1472 2

原创 用python爬github上星级排名前列的项目报错AttributeError: 'NoneType' object has no attribute 'decode'

代码:import requestsimport pygalfrom pygal.style import LightenStyle as ls,LightColorizedStyle as lcs#执行api调用并存储相应url = 'https://api.github.com/search/repositories?q=language:python&sort=stars'r =

2017-08-29 21:48:45 2768 4

原创 i18n 模块无法导入

百度到的:I'm trying to from pygal.i18 import COUNTRIESbut all I get is ImportError:No module named 'pygal.i18n'.The i18n module was removed in pygal-2.0.0, however, it can now be foun

2017-08-27 23:24:20 979

转载 python中访问限制

在Class内部,可以有属性和方法,而外部代码可以通过直接调用实例变量的方法来操作数据,这样,就隐藏了内部的复杂逻辑。但是,从前面Student类的定义来看,外部代码还是可以自由地修改一个实例的name、score属性:>>> bart = Student('Bart Simpson', 98)>>> bart.score98>>> bart.score = 59>>> bar

2017-08-24 17:46:11 206

空空如也

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

TA关注的人

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