def urlopen(*args, **kwargs):
    """ Compatibility function for the urlopen function. Raises an
    RuntimeError if urlopen could not be imported (which can occur in
    frozen applications.
    """
    try:
        from urllib.request import urlopen
    except ImportError:
        raise RuntimeError('Could not import urlopen.')
    return urlopen(*args, **kwargs)
