#################################
# Written by caocao #
# caocao@eastday.com #
# http://nethermit.yeah.net #
#################################
import sys
import re
import string
class CConvert:
def __init__(self):
"Load data table"
try:
fp=open("convert.txt")
except IOError:
print "Can't load data from data.txt\nPlease make sure this file exists."
sys.exit(1)
else:
self.data=fp.read()
fp.close()
def convert(self, strIn):
"Convert GBK to PinYin"
length, strOutKey, strOutValue, i=len(strIn), "", "", 0
while i=0x81 and code1=0x40 and code2