Python中的正则表达式基础
$ 字符串的末尾
^ 字符串的开始
\b 字符的边界
前缀t 字符串中的反斜线(所有字符)不转义
? 可选地匹配(位于之前的)单个字符
() 改变优先级,作为一个整体,一个组
| 或者
(A|B) 精确匹配A或B中的一个
{n,m} 匹配(位于之前的字符)n到m次
VERBOSE 松散正则表达式(re.VERBOSE)常量,忽略空格换行等,可用#作注释
{n} 精确匹配n次
\d 十进制字符,(0-9中的一个)
\D 任意不为十进制字符的字符,为\d取反
+ 1次或者任意多次(大于0就行)
* 0次或者任意多次
相关文档:
可以播放大部分的音视频.
demo download: http://www.sandy1219.com/python/media.rar
playMP3.py
# -*- coding: utf-8 -*-
import wx;
import wx.media;
import os;
import SPrint;
import mediaStateBar;
import mediaList;
import SaveLog;
import MediaItem;
woldcart = "media files|*.*|avi ......
ZoundryDocument
Python skin is known for its color variations and for its elasticity; it is
the warmest leather of the season and ideal for the manufacture of many luxury
goods. Sometimes natural patterns can be hidden when they're done in black, but
the finish here has a bit of a shine to it ......
怎么找不到第三章的学习笔记了?丢了?
Python的函数没有什么的,可以说,看了《简明Python教程》后,就会写了。
这一章提供的内容也比《简明Python教程》要多一些。比较复杂的是作用域规则,不知道是书没讲清楚还是翻译得不好,比较难懂。钱能的《C++程序教程》关于函数的作用域规则讲得要清楚些,有C++的知识在里面, ......
二进制文件下载地址:
SinaGetBook
效果如图:
代码:
#!/usr/bin/env python
#coding=utf-8
#!/usr/bin/env python
#coding=utf-8
import traceback
import sys
import wx
import re
import urllib
import wx.richtext as rt
import wx.lib.buttonpanel as bp
import Casing
import Debug
def trace_back ......