10 2017 档案
摘要:re是python里的正则表达式模块。findall是其中一个方法,用来按照提供的正则表达式,去匹配文本中的所有符合条件的字符串。返回结果是一个包含所有匹配的list。 “\b”在正则表达式中表示单词的开头或结尾,空格、标点、换行都算是单词的分割 []表示满足括号中任一字符。比如“[hi]”,它就不
阅读全文
摘要: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
阅读全文
摘要:运行文件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/
阅读全文
摘要:github commit时出现 Please tell me who you are..... 第一种设置全局的, 直接在命令行输入 git config --global user.email "you@example.com" git config --global user.name "Yo
阅读全文
摘要:首先安装python和pygame的环境 sudo apt-get install python sudo apt-get install python-pygame github项目地址:https://github.com/kiudou/fight_plane 代码中有好几个图,自己找
阅读全文
摘要:此代码用于显示一张图片 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 #...
阅读全文

浙公网安备 33010602011771号