Message-ID: <4UYA7g$ev4@newsmth.net>
Subject: Re: ��一���换�谋����莸某���
Date: Tue, 19 Jun 2007 11:19:10 +0000
From: Slowhand@newsmth.net-SPAM.no (Red, White & Blues)
Path: news.cnusenet.org!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-cn.bbs.comp.lang.python.mbox.zip!g2news1.google.com!news2.google.com!newsfeed2.dallas1.level3.net!news.level3.com!panix!bloom-beacon.mit.edu!news.cn99.com!news.newsmth.net!NEWSMTH
Newsgroups: cn.bbs.comp.lang.python
Organization: 水木����
Mime-Version: 1.0
Content-Type: text/plain; charset="gb2312"
Content-Transfer-Encoding: 8bit
X-Filename: Python/h/M.1182251898.a0
Lines: 58
Xref: news.cnusenet.org cn.bbs.comp.lang.python:37704
���植�屑�诨卮��������,��学��写��一����
import sys
import re
dict = {
1: 'Y',
2: 'Yp',
3: 'Y1',
4: 'Cy1',
5: 'Y2',
6: 'Cy2',
7: 'X',
8: 'Xp',
9: 'X1',
10: 'Cx1',
11: 'X2',
12: 'Cx2',
13: 'X3',
14: 'Cx3',
15: 'Z',
16: 'Cz',
17: 'Zp',
18: 'Z1',
19: 'Cz1',
20: 'Z2',
21: 'Cz2',
22: 'M',
23: 'Cm',
24: 'N'
}
def subplace(filename):
f = open(filename)
s = f.read()
f.close()
for number, string in dict.items():
s = re.sub(r'\b%s\b' % number, string, s)
f = open(filename, 'w')
f.write(s)
f.close()
def main(argv):
subplace(argv[0])
if __name__ == '__main__':
main(sys.argv[1:])
�� �� deff (��色����) �拇������到: ��
: �������谋��募�,����实�����碌墓���,���募�1�械������换���址�,�换�亩�应��系���募�2��.
: �����募�2 �����一��为
: 24 N
: ...................
--
In [1m[31m[5mRP[0m We Trust.
[m[1;31m�� ��源:��水木���� newsmth.net��[FROM: 211.99.222.*][m