A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://libvips.github.io/pyvips/_modules/pyvips/vconnection.html below:

Website Navigation


pyvips.vconnection — pyvips 2.2.1 documentation

Source code for pyvips.vconnection
from __future__ import division

import logging

import pyvips
from pyvips import ffi, vips_lib, _to_string

logger = logging.getLogger(__name__)


[docs]class Connection(pyvips.VipsObject):
    """The abstract base Connection class.

    """

    def __init__(self, pointer):
        # logger.debug('Operation.__init__: pointer = %s', pointer)
        super(Connection, self).__init__(pointer)

[docs]    def filename(self):
        """Get the filename associated with a connection. Return None if there
        is no associated file.

        """

        so = ffi.cast('VipsConnection *', self.pointer)
        pointer = vips_lib.vips_connection_filename(so)
        if pointer == ffi.NULL:
            return None
        else:
            return _to_string(pointer)

[docs]    def nick(self):
        """Make a human-readable name for a connection suitable for error
        messages.

        """

        so = ffi.cast('VipsConnection *', self.pointer)
        pointer = vips_lib.vips_connection_nick(so)
        if pointer == ffi.NULL:
            return None
        else:
            return _to_string(pointer)


__all__ = ['Connection']

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4