示例#1
0
def check_recode():
    try:
        import _recode

    except SystemError:
        raise RuntimeError("the recode library is probably broken.")

    # First, check if the recode version has the famous 3.6 bug
    rq = _recode.request("latin1..latex")

    if _recode.recode(rq, "abc") != "abc":
        raise RuntimeError("the _recode module is broken.")

    return 0
示例#2
0
def check_recode():
    try:
        import _recode

    except SystemError:
        raise RuntimeError('the recode library is probably broken.')

    # First, check if the recode version has the famous 3.6 bug
    rq = _recode.request('latin1..latex')

    if _recode.recode(rq, 'abc') != 'abc':
        raise RuntimeError('the _recode module is broken.')

    return 0
示例#3
0
    warning('cannot test gtk [no DISPLAY]')
except:
    etype, value, tb = sys.exc_info ()
    traceback.print_exception (etype, value, tb)

    error ('unexpected error')
else:
    if gtk.pygtk_version < (2,4,0):
        error ('requested version for PyGtk is %s, but I detected %s' % ('2.4.0', v))

try:
    import _recode
    import _bibtex
    import Pyblio

    rq = _recode.request('latin1..latex')

    l = 'abcd'
    c = _recode.recode(rq, l)

    if l != c:
        error('broken recode version')
except ImportError, msg:
    error('error in python modules dependencies: %s' % msg)

try:
    _bibtex.next_unfiltered
except AttributeError, msg:
    error('Error in python-bibtex module: required function »next_unfiltered« missing: %s'
	   % msg)
except:
示例#4
0
 def __init__ (self, request):
     self.request = _recode.request (request)
     return