class_docstr: An output connection.
  
      
docstr: Make a new target to write to a file descriptor (a small
  integer).
  
  Make a new target that is attached to the descriptor. For example::
  
      target = pyvips.Target.new_to_descriptor(1)
  
  Makes a descriptor attached to stdout.
  
  You can pass this target to (for example) :meth:`write_to_target`.
docstr_tok: ["Make","a","new","target","to","write","to","a","file","descriptor","(","a","small","integer",")",".","Make","a","new","target","that","is","attached","to","the","descriptor",".","For","example",":",":","target","=","pyvips.Target.new_to_descriptor","(","1",")","Makes","a","descriptor","attached","to","stdout",".","You","can","pass","this","target","to","(","for","example",")",":","meth",":","`","write_to_target","`","."]
code: def new_to_descriptor(descriptor):
      """Make a new target to write to a file descriptor (a small
      integer).
  
      Make a new target that is attached to the descriptor. For example::
  
          target = pyvips.Target.new_to_descriptor(1)
  
      Makes a descriptor attached to stdout.
  
      You can pass this target to (for example) :meth:`write_to_target`.
  
      """
  
      # logger.debug('VipsTarget.new_to_descriptor: descriptor = %d',
      #   descriptor)
  
      # targets are mutable, so we can't use the cache
      pointer = vips_lib.vips_target_new_to_descriptor(descriptor)
      if pointer == ffi.NULL:
          raise Error(
              "can't create output target from descriptor {0}".format(
                  descriptor
              )
          )
  
      return Target(pointer)
  
file_path: pyvips/pyvips/vtarget.py
imports: from __future__ import division
  import logging
  import pyvips
  from pyvips import ffi, vips_lib, Error, _to_bytes
label_desc: Use image node_id 2 for calling the Target obj's underlying member method code with example usage: obj.new_to_descriptor(descriptor) and returns: Target