[KoCo-CVS] [Commit] KoreanCodecs/korean qwerty2bul.py
Brought to you by:
perky
From: Hye-Shik C. <pe...@us...> - 2003-01-12 22:57:21
|
perky 03/01/12 14:57:20 Modified: korean qwerty2bul.py Log: Style fix: respect terminal with 80 columns. :) Revision Changes Path 1.6 +24 -20 KoreanCodecs/korean/qwerty2bul.py Index: qwerty2bul.py =================================================================== RCS file: /cvsroot/koco/KoreanCodecs/korean/qwerty2bul.py,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- qwerty2bul.py 12 Jan 2003 22:54:12 -0000 1.5 +++ qwerty2bul.py 12 Jan 2003 22:57:19 -0000 1.6 @@ -17,7 +17,7 @@ # along with KoreanCodecs; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # -# $Id: qwerty2bul.py,v 1.5 2003/01/12 22:54:12 perky Exp $ +# $Id: qwerty2bul.py,v 1.6 2003/01/12 22:57:19 perky Exp $ # import codecs @@ -25,29 +25,29 @@ from korean.hangul import ishangul, join, split, isJaeum, isMoeum codekeymap = { - Jaeum.G: 'r', Jaeum.GG: 'R', Jaeum.GS: 'rt', - Jaeum.N: 's', Jaeum.NJ:'sw', Jaeum.NH: 'sg', Jaeum.D: 'e', - Jaeum.DD:'E', Jaeum.L: 'f', Jaeum.LG: 'fr', Jaeum.LM: 'fa', - Jaeum.LB:'fq', Jaeum.LS:'ft', Jaeum.LT: 'fx', Jaeum.LP: 'fv', - Jaeum.LH:'fg', Jaeum.M: 'a', Jaeum.B: 'q', Jaeum.BB: 'Q', - Jaeum.BS:'qt', Jaeum.S: 't', Jaeum.SS: 'T', Jaeum.NG: 'd', - Jaeum.J: 'w', Jaeum.JJ:'W', Jaeum.C: 'c', Jaeum.K: 'z', - Jaeum.T: 'x', Jaeum.P: 'v', Jaeum.H: 'g', - - Moeum.A: 'k', Moeum.AE:'o', Moeum.YA: 'i', Moeum.YAE:'O', - Moeum.EO:'j', Moeum.E: 'p', Moeum.YEO:'u', Moeum.YE: 'P', - Moeum.O: 'h', Moeum.WA:'hk', Moeum.WAE:'ho', Moeum.OE: 'hl', - Moeum.YO:'y', Moeum.U: 'n', Moeum.WEO:'nj', Moeum.WE: 'np', - Moeum.WI:'nl', Moeum.YU:'b', Moeum.EU: 'm', Moeum.YI: 'ml', - Moeum.I: 'l', + Jaeum.G: 'r', Jaeum.GG:'R', Jaeum.GS: 'rt', + Jaeum.N: 's', Jaeum.NJ:'sw', Jaeum.NH: 'sg', Jaeum.D: 'e', + Jaeum.DD:'E', Jaeum.L: 'f', Jaeum.LG: 'fr', Jaeum.LM: 'fa', + Jaeum.LB:'fq', Jaeum.LS:'ft', Jaeum.LT: 'fx', Jaeum.LP: 'fv', + Jaeum.LH:'fg', Jaeum.M: 'a', Jaeum.B: 'q', Jaeum.BB: 'Q', + Jaeum.BS:'qt', Jaeum.S: 't', Jaeum.SS: 'T', Jaeum.NG: 'd', + Jaeum.J: 'w', Jaeum.JJ:'W', Jaeum.C: 'c', Jaeum.K: 'z', + Jaeum.T: 'x', Jaeum.P: 'v', Jaeum.H: 'g', + + Moeum.A: 'k', Moeum.AE:'o', Moeum.YA: 'i', Moeum.YAE:'O', + Moeum.EO:'j', Moeum.E: 'p', Moeum.YEO:'u', Moeum.YE: 'P', + Moeum.O: 'h', Moeum.WA:'hk', Moeum.WAE:'ho', Moeum.OE: 'hl', + Moeum.YO:'y', Moeum.U: 'n', Moeum.WEO:'nj', Moeum.WE: 'np', + Moeum.WI:'nl', Moeum.YU:'b', Moeum.EU: 'm', Moeum.YI: 'ml', + Moeum.I: 'l', - u'': '', + u'': '', } keycodemap = {} for k, v in codekeymap.items(): - keycodemap[v] = k - keycodemap.setdefault(v.upper(), k) + keycodemap[v] = k + keycodemap.setdefault(v.upper(), k) keycodes = ''.join(keycodemap.keys()) del k, v @@ -62,7 +62,9 @@ def pushcomp(self): if self.chosung and not self.jungsung: self.word_valid = 0 - self.word_comp.append(join([self.chosung, self.jungsung, self.jongsung])) + self.word_comp.append(join([ + self.chosung, self.jungsung, self.jongsung + ])) self.clearcomp() def clearcomp(self): @@ -196,3 +198,5 @@ def getregentry(): return (Codec().encode, Codec().decode, StreamReader, StreamWriter) + +# ex: ts=8 sts=4 et |