10 2017 档案

摘要:re是python里的正则表达式模块。findall是其中一个方法,用来按照提供的正则表达式,去匹配文本中的所有符合条件的字符串。返回结果是一个包含所有匹配的list。 “\b”在正则表达式中表示单词的开头或结尾,空格、标点、换行都算是单词的分割 []表示满足括号中任一字符。比如“[hi]”,它就不 阅读全文
posted @ 2017-10-05 20:24 启动 阅读(176) 评论(0) 推荐(0)
摘要:web.py运行代码时出现 Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/web/application.py", line 239, in process return self.ha 阅读全文
posted @ 2017-10-04 14:34 启动 阅读(2140) 评论(0) 推荐(0)
摘要:运行文件Python code.py 文件里用到import web出现 Traceback (most recent call last): File "code.py", line 14, in <module> app.run() File "/usr/local/lib/python2.7/ 阅读全文
posted @ 2017-10-04 11:29 启动 阅读(1755) 评论(0) 推荐(1)
摘要:github commit时出现 Please tell me who you are..... 第一种设置全局的, 直接在命令行输入 git config --global user.email "you@example.com" git config --global user.name "Yo 阅读全文
posted @ 2017-10-03 21:49 启动 阅读(651) 评论(0) 推荐(0)
摘要:首先安装python和pygame的环境 sudo apt-get install python sudo apt-get install python-pygame github项目地址:https://github.com/kiudou/fight_plane 代码中有好几个图,自己找 阅读全文
posted @ 2017-10-03 16:31 启动 阅读(1321) 评论(0) 推荐(0)
摘要:此代码用于显示一张图片 1 # -*- coding: utf-8 -*- 2 import pygame #导入pygame库 3 from sys import exit #向sys模块借用exit函数来退出程序 4 pygame.init() #初始化pygame 5 6 screen = pygame.display.set_mode((600,170),0,32) 7 #... 阅读全文
posted @ 2017-10-01 20:38 启动 阅读(259) 评论(0) 推荐(0)