python.odpy.iopar

Copyright (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt
  • AUTHOR : Bert

  • DATE : August 2018

IOPar tools

Module Contents

Functions

read_line(words)

Interprets one line from an IOPar (ascii) file

read_from_iopar(fnm, searchkey)

Return the value of a key from an OpendTect IOPar text file

python.odpy.iopar.read_line(words)

Interprets one line from an IOPar (ascii) file

Parameters:
  • words (string): One line as read from an open text file

Returns:
  • tuple of two key,val strings interpreted from the input line

Everything right of the first colon is part of the value string val can be an empty string

python.odpy.iopar.read_from_iopar(fnm, searchkey)

Return the value of a key from an OpendTect IOPar text file

Parameters:
  • fnm (string): Full path to an OpendTect IOPar (ascii) file

  • searchkey (string): Key in the IOPar for which the value string is requested

Returns:
  • str: If the searchkey is present in the file, value string the corresponds

to it. Can be an empty string. None or empty string otherwise.