home *** CD-ROM | disk | FTP | other *** search
- # Source Generated with Decompyle++
- # File: in.pyc (Python 2.6)
-
- __license__ = 'GPL v3'
- __copyright__ = '2009, John Schember <john@nachtimwald.com>'
- __docformat__ = 'restructuredtext en'
- A_CHARS = range(160, 256) + range(130, 136) + range(138, 141) + range(145, 152) + range(153, 157) + [
- 159]
- Latin_ExtendedA = range(256, 260) + [
- 261,
- 263,
- 268,
- 269,
- 274,
- 275,
- 277,
- 279,
- 281,
- 283,
- 285,
- 287,
- 298,
- 299,
- 301,
- 303,
- 305,
- 321,
- 322,
- 324,
- 328] + range(331, 334) + [
- 335,
- 337,
- 341] + range(345, 348) + [
- 351,
- 355,
- 361,
- 363,
- 365,
- 375,
- 378,
- 381,
- 382]
- Latin_ExtendedB = [
- 447,
- 462,
- 464,
- 466,
- 468,
- 481,
- 483,
- 487,
- 491,
- 496,
- 519,
- 541,
- 551,
- 559,
- 563]
- IPA_Extensions = [
- 593,
- 593,
- 596,
- 601,
- 604,
- 613,
- 618,
- 626,
- 643,
- 649,
- 650,
- 652,
- 655,
- 658,
- 660,
- 668]
- Spacing_Modifier_Letters = [
- 702,
- 703,
- 711,
- 712,
- 716,
- 720,
- 728,
- 729]
- Greek_and_Coptic = range(913, 930) + range(931, 938) + range(945, 970) + [
- 977,
- 989]
- Hebrew = range(1488, 1515)
- Latin_Extended_Additional = [
- 7691,
- 7693,
- 7703,
- 7714,
- 7716,
- 7717,
- 7723,
- 7731,
- 7735,
- 7745,
- 7747,
- 7749,
- 7751,
- 7763] + range(7769, 7772) + [
- 7777,
- 7779,
- 7787,
- 7789,
- 7791,
- 7825,
- 7827,
- 7830,
- 7841,
- 7885,
- 7929]
- General_Punctuation = [
- 8209,
- 8248,
- 8253,
- 8258]
- Arrows = [
- 8592,
- 8594]
- Mathematical_Operators = [
- 8706,
- 8730,
- 8734,
- 8741,
- 8747,
- 8800,
- 8852,
- 8853,
- 8942]
- Enclosed_Alphanumerics = [
- 9418]
- Miscellaneous_Symbols = range(9756, 9793) + range(9794, 9800) + range(9824, 9828) + range(9837, 9840)
- Dingbats = [
- 10003,
- 10016]
- Private_Use_Area = range(57344, 57373) + range(57374, 57385) + range(57386, 57426)
- Alphabetic_Presentation_Forms = [
- 64258,
- 64298,
- 64299]
- U_CHARS = Latin_ExtendedA + Latin_ExtendedB + IPA_Extensions + Spacing_Modifier_Letters + Greek_and_Coptic + Hebrew + Latin_Extended_Additional + General_Punctuation + Arrows + Mathematical_Operators + Enclosed_Alphanumerics + Miscellaneous_Symbols + Dingbats + Private_Use_Area + Alphabetic_Presentation_Forms
-
- def unipmlcode(char):
-
- try:
- val = ord(char.encode('cp1252'))
- if val in A_CHARS:
- return '\\a%i' % val
- except:
- pass
-
- val = ord(char)
- if val in U_CHARS:
- return '\\U%04x'.upper() % val
- return '?'
-
-