예제 #1
0
from __future__ import print_function
import bisect
import getopt
import glob
import os
import re
import sys
from operator import itemgetter
import subprocess
from ucd import ucd, pickle_file
from columnize import Columnize
from pdb import set_trace as xx
if 0:
    import debug
    debug.SetDebugger()

py3 = True if sys.version_info[0] > 2 else False
py2 = not py3
if py2:
    chr = unichr

nl = "\n"

# Global variables you'll need to set
pdf_dir = "/doc/unicode/pdf"  # Where PDFs are located
launch = "/usr/bin/exo-open"  # Program to launch a file
launch = "/usr/bin/cygstart"  # Program to launch a file

# Common codepoints (in hex) to list with the -c option
common = '''
예제 #2
0
# See http://opensource.org/licenses/OSL-3.0.
#

from __future__ import division, print_function
from columnize import Columnize
import getopt
import os
import sys
from collections import OrderedDict
from sig import sig

# Debugging stuff
from pdb import set_trace as xx
if 0:
    import debug
    debug.SetDebugger()  # Start debugger on unhandled exception

# python 2/3 adaptations
py3 = sys.version_info[0] == 3
Int = (int, ) if py3 else (int, long)
String = (str, ) if py3 else (str, unicode)
chr = chr if py3 else unichr
input = input if py3 else raw_input

if py3:
    long = int
    from io import StringIO
else:
    from StringIO import StringIO

nl = "\n"